Droping an Identity column and Creating a new Identity column

  • Hi Guys!

    I have a situation here, where I need script for dropping an Identity column in a Table and creating a new Identity Column.....

    What I was able to find out was that, 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.

    Please help me in this regard.

    Thanks in advance,

    Radhika

     

  • Hi Radhika,

    Search on this site for "dropping identity" and you will find couple of solutions. Another option is to add a new column to he table, copy over the value from the Identity column to the newly added column, drop the identity column and rename the new column to the identity column name.

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply