Mysql
 sql >> Database >  >> RDS >> Mysql

Come rimuovere due colonne duplicate

SELECT  DISTINCT a.*
FROM    TableName a
        INNER JOIN TableName b
          ON a.from = b.to
             AND a.to = b.from
WHERE   a.from < b.from