Monday, January 31, 2022

[FIXED] unique combination of 2 columns in phpmyadmin database

Issue

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 :

enter image description here

How do i proceed?


Solution

Since id is already primary key, you should choose "unique" Shown on screenshot below

enter image description here



Answered By - po_taka

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.