Ini cukup dekat. Dengan asumsi:
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| d | text | YES | | NULL | |
| id | int(11) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+
Lalu kueri ini:
select x.id,x2.id,x.d,x2.d from x left join x as x2 on replace(x.d," ","") = replace(x2.d," ","") and x.id != x2.id having !(x2.id is null);
Memberi Anda baris duplikat. Gagal jika Anda memiliki "Helloworld" (yaitu tanpa spasi) dan Anda tidak ingin itu cocok.