October 12, 2011 at 6:21 am
Changes to be made on 450 tables
All the tables have a composite primary key containig two columns
let say pk_age on (ID,YEAR)
now it is required to add a third column on the primary key pk_Age(ID,YEAR,STATUS)
Doing this through the interface is time consuming.
Need to automate this
thanks
October 12, 2011 at 7:57 am
And, what are you looking for? The script to do this? A way of automating a script you have?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 12, 2011 at 6:04 pm
You need to drop the primary key constraint first and then re-create it with a new column added to the primary key
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply