消除重複值選擇所有重複記錄我的表名圖MYSQL由另一列
欄目有:wwid_a,wwid_b,活躍,DATE_ADDED
值是
+--------+--------+--------+---------------------+ | wwid_a | wwid_b | active | date_added | +--------+--------+--------+---------------------+ | 1943 | 402158 | 1 | 2014-03-05 09:08:51 | | 1943 | 402209 | 1 | 2014-03-05 09:08:52 | | 1943 | 402464 | 1 | 2014-03-05 09:08:52 | | 402158 | 1943 | 1 | 2014-03-05 09:08:5 | | 402209 | 1943 | 1 | 2014-03-05 09:08:59 | | 402464 | 1943 | 1 | 2014-03-05 09:08:58 | +--------+--------+--------+---------------------+
基本上每個條目具有由wwid_a和wwid_b互換列的重複記錄。
我想選擇查詢,這將使每個唯一的記錄通過交替wwid_a和wwid_b消除重複值
像
+--------+--------+--------+---------------------+ | wwid_a | wwid_b | active | date_added | +--------+--------+--------+---------------------+ | 1943 | 402158 | 1 | 2014-03-05 09:08:51 | | 1943 | 402209 | 1 | 2014-03-05 09:08:52 | | 1943 | 402464 | 1 | 2014-03-05 09:08:52 | +--------+--------+--------+---------------------+
該表確實具有以下數據記錄 – kayra