Reputation: 609
How to make a composite primary key on phpmyadmin. such that student id is combination of year and roll number. sid = 112132 , 11 of year 2011 and 2132 is roll number?? anybody help..
Upvotes: 60
Views: 57068
Reputation: 3945
If the table is already created:
You can now also define the keys while creating the table as mentioned in @amila's answer
Upvotes: 116
Reputation: 859
Make the index of the required attributes to primary at the time of creating the table.The foloowing figure explains it in Phpmy admin.
Upvotes: 2