Set Identity property on a column

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2007
Posts: 1
Reputation: user74 is an unknown quantity at this point 
Solved Threads: 0
user74 user74 is offline Offline
Newbie Poster

Set Identity property on a column

 
0
  #1
May 16th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4
Reputation: rado is an unknown quantity at this point 
Solved Threads: 1
rado rado is offline Offline
Newbie Poster

Re: Set Identity property on a column

 
0
  #2
May 16th, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC