Consultor Eletrônico



Kbase P24856: How to delete all records from a table?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/02/2008
Status: Verified

GOAL:

How to delete all records from a table?

FIX:

To remove all records from a table, use the following code:

/* Many Transactions But Will Not Blow Out Lock Table */
FOR EACH YourTableGoesHere EXCLUSIVE-LOCK:
DELETE YourTableGoesHere.
END.

/* One Big Transaction, Faster, But May Blow Out Lock Table Or Cause BI File Problems */
DO TRANSACTION:
FOR EACH YourTableGoesHere EXCLUSIVE-LOCK:
DELETE YourTableGoesHere.
END.
END.