Deleting all rows from a table  Chapter 8: Creating Databases and Tables

Chapter 7: Adding, Changing, and Deleting Data

truncate table syntax

The syntax of truncate table is:

truncate table [ [ database.]owner.]table_name 
	[ partition partition_name ]

For example, to remove all the data in sales, type:

truncate table sales 

For information about the partition clause, see Chapter 10, “Partitioning Tables and Indexes.”

Permission to use truncate table, like drop table, defaults to the table owner and cannot be transferred.

A truncate table command is not caught by a delete trigger. See Chapter 19, “Triggers: Enforcing Referential Integrity.”





Copyright © 2005. Sybase Inc. All rights reserved. Chapter 8: Creating Databases and Tables

View this book as PDF