5. Populating Tables : Bulk Copying : Example: Perform Bulk Copy into a Heap Table
 
Share this page                  
Example: Perform Bulk Copy into a Heap Table
When a heap table is unjournaled and has no indexes, all copies are performed using bulk copy, regardless of the size of the table. Bulk copying into a non-empty heap table is allowed by logging the last valid page before starting the copy. If an error or rollback occurs, all new pages are marked as free.
Note:  The table is not returned to its original size.
For example, in the following sequence of statements, all of the copy operations into the heap table are done as bulk copies:
Create a heap table
Copy to the heap table (table is empty)
Copy to the heap table (append to the table)
Perform inserts, updates, and deletes
Copy to the heap table (append to the table)