My database has a table with thousands of records. The primary key is an integer. There are many foreign key restrictions in this column.
I want to change this column to become an identity key. What is the best way to do this? I also need to send this update to install our clients.
Reward points for a response that runs on Sql Server 2000.
SQL Server Management Studio has a great feature that saved my day.
SSMS "" → "" → " ", " " " , ".
, Identity. . " " "()" "". " script". .
script, constrainsts, . WOW!
.
: . , script .
. , , , 3 !
Enterprise Manager , .
(, , , , , - 1
"ALTER TABLE" DDL . .
Enterprise Manager, , Sql . . , http://www.mssqltips.com/tip.asp?tip=1397
, script -, fk.
, . ! .
ALTER TABLE , Enterprise Manager.