I have a table with 3 columns : id, person and code.
I want that the combination of person
and code
to be unique in the table, wich means that the same person with the same code is not allowed more than one time in the table.
How can I set such thing in phpmyadmin?
Thanks for help and excuse my english.
EDIT
I have the 2 columns selected in my screen :
How do i proceed?
Since id is already primary key, you should choose "unique" Shown on screenshot below
Click in table name so to have the fields view.
Select the two fields you need.
Click on key at the bottom of fields.
You should select both fields and choose unique key.you can find this key at bottom field near primary key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With