I do not believe that you can alter an 'identity' out of a column. you can however turn it off if you like. this will allow you to insert a specific value.
command is
SET IDENTITY_INSERT [database.[owner.]]{table} {ON | OFF}
depending on what you want to do, it may help. only one table at a time can have identity insert on.
You cannot remove the Identity property using a simple T-SQL statement. You can use Enterprise Manager to remove the Identity property. EM then creates a new table without the Identity property, copies all the data, deletes the old table and renames the new table to the old name. You could write a T-SQL script to do the same.
I know it is not elegant or efficient but that is current state of T-SQL. Terry L. Broadbent Programming and Computing Resources
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.