March 18, 2009 at 5:31 am
Hi,
Please let me know if any one r aware of removing the identity property through sql script for a column?
thanks,
Indu
March 18, 2009 at 5:34 am
ALTER table tablename
ALTER column columnname datatype
through wizard its more easy...
March 18, 2009 at 5:39 am
oh sorry iam wrong...
if you want to disable the identity for a while
use SET IDENTITY_INSERT ON/OFF
to remove identity property then i suggest wizard.rick click on the table-->modify table
any other ideas how to remove identity property through T-SQL???
March 18, 2009 at 5:50 am
Through T-SQL its quite complex...
Create another table say table_test with same structure as your table except the identity property.
Move the data into the table_test using insert into...
Rename the original table to table_old
Rename the table_test to original table name...
March 18, 2009 at 6:06 am
Hi Reddy
Will this work on 2008, since i tried the same on 2008 management studio, it gave me an error stats that the table has to be dropped, 🙂
March 18, 2009 at 6:30 am
where exactly you got the error??Paste the error...
March 18, 2009 at 6:52 am
Thanks mate, just to mention i used SQL Management and then opened the design of table from menu, then changed the Idnetity spec option to No and tried to save this , i got the following error( attached as a bmp file), but i can do this on 2005.
How do i upload a image file with this post 🙁
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply