Hi, I'm trying to figure out how to apply these from the manual, but to
no avail. Is it possible that my version (4.0.18) does not implement
these?
I have two tables: products and products_by_product_area. Both have a
field "product". I try
SELECT product from products WHERE NOT EXISTS (SELECT DISTINCT * from
products_by_product_areas WHERE products_by_product_areas.product =
products.product);
Both of these queries run fine on their own. It looks to me that I'm
simply adapting from the manual, but all I get is
ERROR 1064: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'EXISTS (SELECT DISTINCT * from products_by_product_areas WHERE
OK, so I grab the example verbatim from the manual:
SELECT DISTINCT store_type FROM Stores
WHERE EXISTS (SELECT * FROM Cities_Stores
WHERE Cities_Stores.store_type = Stores.store_type);
And run it. Same error. Never mind that I don't have these tables: the
query does not compile. What is going on?