|
Posted by Erland Sommarskog on 09/25/07 20:56
info (informatyk@fitness[CUT]authority.pl) writes:
> 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@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|