Using the from clause with delete  Deleting all rows from a table

Chapter 7: Adding, Changing, and Deleting Data

Deleting from IDENTITY columns

You can use the syb_identity keyword in a delete statement on tables containing an IDENTITY column. For example, this statement removes the row for which row_id equals 1:

delete sales_monthly
where syb_identity = 1

After you delete IDENTITY column rows, you may want to eliminate gaps in the table’s IDENTITY column numbering sequence. See “Renumber the table’s IDENTITY columns with bcp”.





Copyright © 2005. Sybase Inc. All rights reserved. Deleting all rows from a table

View this book as PDF