MySQL Forums
Forum List  »  Newbie

Re: Stop multiple attendance at same event by person
Posted by: Peter Brawley
Date: February 23, 2020 11:59AM

PK on the first col, unique on the 2nd & 3rd works ...

drop table if exists t;
create table t( i int primary key, j int, k int, unique(j,k) );
insert into t values(1,1,1);
insert into t values(2,1,1);
ERROR 1062 (23000): Duplicate entry '1-1' for key 't.j'

Options: ReplyQuote


Subject
Written By
Posted
Re: Stop multiple attendance at same event by person
February 23, 2020 11:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.