• subscribe
August 24, 2004 12:00 AM

Deleting an IDENTITY Column

SQL Server Pro
InstantDoc ID #43631

Can I use a T-SQL script to delete an IDENTITY column?

T-SQL's ALTER TABLE statement doesn't support dropping the IDENTITY property in SQL Server 2000 or 7.0. Your only option for deleting an IDENTITY column is to create a new table structure without the IDENTITY column, then copy the data into this structure.



ARTICLE TOOLS

Comments
  • Chris
    5 years ago
    Aug 23, 2007

    what about 2005?

  • yukonguy
    8 years ago
    Sep 09, 2004

    Your question and answer are confusing each other. You can certainly drop a column that has the identity property. I think your question meant to read, "Can I use a T-SQL script to remove the IDENTITY property for a column?"

You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...