New answers tagged replace
You can't do this in a single step. The locking required to truncate the table precludes you querying the table at the same time. The best option you would have is to declare a global temporary table (DGTT) and insert the rows you want into it, truncate the source table, and then insert the rows from the DGTT back into the source table. Something like: ...
If you are doing SQL, then you probably would need to do a TRUNCATE/DELETE on the table and then INSERT into. If you are using LOAD and/or IMPORT, they both have options for clearing the table before getting data into the table.
Top 50 recent answers are included