How can I enforce that my composite key columns do not equal one another in MySQL?
MySQL-8.0.16 enforces check constraints
alter table user_relationships add check (requester_id &lt;&gt; addressee_id)

Afterwards:
insert into user_relationships values (3,3,NOW())



Check constraint 'user_relationships_chk_1' is violated.


ref: fiddle