I have a table which maintains a list of categories and has a field called
catID. This field is a one-to-many relationship with another table.
What I want to do is remove any "empty" categories - aka: remove any
categories which aren't used in the second table.
I thought MySQL at least partially supported nested SELECT queries, but
either it does not support them in DELETE's or I got the syntax wrong.
Here's what I was trying to use:
DELETE FROM Categories WHERE NOT(catID IN (SELECT DISTINCT catID FROM
items));
Any easy alternatives here?
Adam Clauss
cabadam@ <mailto:[EMAIL PROTECTED]> houston.rr.com