Postgresql – Check many values are not equal in a single statement
I'm creating a constraint in a table so that none of 8 columns must be equal to each other. I wanted to do it like this: alter table mytable add constraint no_duplicate_values check (col_1 <> col_2 <> col__3 <> col__4…