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('[email protected]','[email protected]')
;
insert into associations values('[email protected]','[email protected]');
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?