I have this mySql table:
create table associations
(email1 varchar(30),
email2 varchar(30),
primary key(email1, email2));
Now in this table if I insert two rows as follows:
insert into associations values('a@abc.com','b@abc.com')
;
insert into associations values('b@abc.com','a@abc.com');
these are acceptable in the database. What I want to do is they should not be acceptable into the database as I am only interested in the combination of the keys and not their order.
Is there any inbuilt functionality/keyword/hack in mysql(or for that matter any other database) which allows me to do so?