DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   MS SQL (http://www.daniweb.com/forums/forum127.html)
-   -   Set Identity property on a column (http://www.daniweb.com/forums/thread78524.html)

user74 May 16th, 2007 4:45 pm
Set Identity property on a column
 
hello,

I have a table with int Primary key. Is there a way to set identity property on this field w/o dropping/recreating the table?

Thank you.

rado May 16th, 2007 7:23 pm
Re: Set Identity property on a column
 
i thing that is

SET IDENTITY ON
insert INTO tb (id,.....) values(1,...)
SET IDENTITY OFF

, then you can set ident same as previous data.


All times are GMT -4. The time now is 5:10 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC