How to make composite primary key on phpmyadmin
Solution 1:
If the table is already created:
- From the "Structure" pane, check the boxes to the left of all field names you want included in the primary key. (For example, in an order items table, you might check "order ID" and "line item number".)
- Then click "Primary" in the "With selected:" list of operations just below the field names.
You can now also define the keys while creating the table as mentioned in @amila's answer
Solution 2:
Make the index of the required attributes to primary at the time of creating the table.The foloowing figure explains it in Phpmy admin.