Tuesday, November 8, 2011

Tell me how to alter a table without change in values to add one more column in composite key using MsSQL 2000

I have a table in MS SQL 2000 database. Currently 3 columns of this table combine to create a primary key. i.e it uses 3 fields as composite key. Now I want to add 1 more field as composite key thus finally there would be 4 fields to uniquely identify a row. Pls tell me how can I write a script so that without changing any values in the table I can add 1 more field as composite key. I cannot manually change the design from Enterprise manager or any where else. I need a script to do this work. Please help me out . Will alter table syntax work over here. I tried but was unable. If it works can u give me the syntax. Thanks in advance.

No comments:

Post a Comment