dbTalk Databases Forums  

autoincrement question sql 2005 server

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss autoincrement question sql 2005 server in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
info
 
Posts: n/a

Default autoincrement question sql 2005 server - 09-25-2007 , 08:06 AM






How add column autoincrement in sql server 2005 use SQL Server Management
Studio?

Tom



Reply With Quote
  #2  
Old   
Piero 'Giops' Giorgi
 
Posts: n/a

Default Re: autoincrement question sql 2005 server - 09-25-2007 , 12:45 PM






On Sep 25, 6:06 am, "info" <informatyk@fitness[CUT]authority.pl>
wrote:

Quote:
How add column autoincrement in sql server 2005 use SQL Server Management
Studio?
You just need to set the "Identity Specification" column for the
particular ID field to "Yes" in the table editor

P



Reply With Quote
  #3  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: autoincrement question sql 2005 server - 09-25-2007 , 03:56 PM



info (informatyk@fitness[CUT]authority.pl) writes:
Quote:
How add column autoincrement in sql server 2005 use SQL Server Management
Studio?
For an existing column? That's a bit of work, because you need to copy
the table to a new definition. There is now ALTER TABLE command to add/drop
identiity. It may look simple in SSMS, but Mgmt Studio performs all that
drop affair behind your back. That would be OK if it knew how to do it,
but it doesn't, so if things go wrong you may mess up your database.

Of course, if you run SQL commands, you may mess the database on your
own as well, but at least you knew what you did.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.