Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Add a 3rd column to primary key colums

Author  Topic 

skiabox
Posting Yak Master

169 Posts

Posted - 2008-12-07 : 18:45:28
I have a table with 2 primary keys already defined.
How can I add a 3rd column to the primary key constraint?
Thank you!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-07 : 19:25:03
Drop the constraint, then add it with the new definition. You can do this with the ALTER TABLE statement or via the GUI.

If the column doesn't already exist, then you can also add it with the ALTER TABLE statement or via the GUI.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -