Tohle je docela blízko. Za předpokladu:
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| d | text | YES | | NULL | |
| id | int(11) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+
Pak tento dotaz:
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);
Získáte duplicitní řádky. Selže, pokud máte "Helloworld" (tj. bez mezery) a nechcete, aby to odpovídalo.