User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,136 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,104 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 2992 | Replies: 1
Reply
Join Date: May 2007
Posts: 1
Reputation: user74 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
user74 user74 is offline Offline
Newbie Poster

Set Identity property on a column

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Posts: 4
Reputation: rado is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
rado rado is offline Offline
Newbie Poster

Re: Set Identity property on a column

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 6:34 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC