0

hello all

i have allready created table and wan to add Composite primary key into that so for that i am using following statement

ALTER TABLE pqrimasterdetail ADD  primary key  (PQRIMasterID,Type,Year,PhysiciansID);

but in not executed successful it gives

the query could not be Executed.
Multiple Primary key Defined


if any one have idea then Please Help asap Thank's in advance

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by hirenpatel53
0

Well, if you have defined already a primary key, you cannot have another one. What does show create table pqrimasterdetail say?
You can instead add a second unique key: ALTER TABLE pqrimasterdetail ADD [B]Unique[/B] (PQRIMasterID,Type,YEAR,PhysiciansID);

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.