I have a table like this, which represents friendships between persons in a social network
CREATE TABLE friendships
(
requester INT,
acceptor INT
);
Now I want unique combination of (requester, acceptor), order independent. Normal unique constraint, UNIQUE (requester, acceptor), is not enough for this case because if there is already, for example, one row with the combination (1, 2) the combination (2, 1) is still allowed, and I don't want that.
How to solve this? I'm using MySQL.