In mysql can I set a condition that a combination of two fields can never be the same???
Example:
id-1
name-abc
grade-A
Now, another entry with name=’abc’ and grade=’A’ can not be added into that table ????
In mysql can I set a condition that a combination of two fields can
Share
You can create a composite primary key from those two columns, but that makes little sense as the table already has an ID field, and surely two people of the same name can have the same grade? e.g.: