23 Mar
2001
23 Mar
'01
18:21
Hello, Linux folkz: Question: Suppose I have a table: Col1 Col2 --------- A A1 A NULL B B1 B NULL C NULL --------- I would like to delete records with duplicate values in Col1 with NULL in Col2 (C, NULL) has to remain. In M$SQL this is done with a query: DELETE FROM table WHERE Col1 IN (SELECT Col1 FROM table GROUP BY Col1 HAVING count(*)>1); MySQL 3.22 does not support sub-queries. Is there a way to do this job without using sub-queries? Thanks. Alex.