Introduction to DB2 for z/OS
|
Previous topic |
Next topic |
Contents |
Glossary |
Contact z/OS |
PDF
Truncate statements Introduction to DB2 for z/OS |
|
|
You can use the TRUNCATE statement to delete all rows for base tables or declared global temporary tables. You can embed a TRUNCATE statement in an application program or issue it interactively. TRUNCATE statements are executable statements that you can prepare dynamically. To truncate a table, you must have the proper authorization or be the owner of the table. The TRUNCATE statement should not be confused with the TRUNCATE function. This example empties an unused inventory table regardless of any existing triggers and returns its allocated space. TRUNCATE TABLE INVENTORY DROP STORAGE IGNORE DELETE TRIGGERS; |
Copyright IBM Corporation 1990, 2010 |