select distinct least(column_1, column_2), greatest(column_1, column_2) from the_table where column_1 <> column_2;