Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Deleting
all rows from a table [Table of Contents] Chapter 9 Views: Limiting Access to
Data

Transact-SQL User's Guide

[-] Chapter 8 Adding, Changing, and Deleting Data
[-] Deleting all rows from a table
[-] truncate table syntax

truncate table syntax

The syntax of truncate table is:

truncate table [[database.]owner.]table_name 

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

truncate table sales 

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 16, "Triggers: Enforcing Referential Integrity."


Deleting
all rows from a table [Table of Contents] Chapter 9 Views: Limiting Access to
Data