Adding IDENTITY columns  Modifying IDENTITY columns

Chapter 8: Creating Databases and Tables

Dropping IDENTITY columns

You can drop IDENTITY columns just like any other column. For example, to drop the IDENTITY column created in the previous section:

alter table stores
drop record_id

However, the following restrictions apply to dropping an identity column:

You must turn off the set identity_insert option by issuing:

set identity_insert table_name off

Drop the IDENTITY column, then add the new IDENTITY column, and turn on the set identity_insert option by entering:

set identity_insert table_name on




Copyright © 2005. Sybase Inc. All rights reserved. Modifying IDENTITY columns

View this book as PDF