4. Managing Tables and Views : Table Management : Duplicate Rows in Tables : Duplicate Rows When Adding New Rows or Modifying a Table
 
Share this page                  
Duplicate Rows When Adding New Rows or Modifying a Table
If a table was originally created to allow duplicates, the duplicate rows are preserved, even when the table is modified to another structure.
If a table allows duplicates, duplicate rows can always be inserted.
If a table does not allow duplicates:
Duplicate rows can be added if the table uses a heap storage structure.
Single row inserts (insert . . . values) are silently discarded if a duplicate row occurs on a keyed structure.
Multiple row inserts (insert . . . select) generate an error if a duplicate row occurs on a keyed structure. The entire statement is rolled back.
When a table is modified from a heap structure to a keyed structure, duplicates are eliminated.