mysql - distinct value combinations in sql -
i have columns this:
value1____value2 value3____value4 value2____value1 value5____value6
is there way eliminate combination on 3rd line, since it's same { value1, value2 }?
what approach?
alter table the_table add constraint my_check unique (least(column1, column2), greatest(column1, column2))
Comments
Post a Comment