Daniel,

>I have a database with the following (simplified) structure:

>[Products]
>ProductID
>ProductName

>[PurchaseRecords]
>ProductID
>CustomerID
>....

>I need to find all of the rows in the table Products which do not have
>at least one corresponding row in PurchaseRecords.  How do I translate
>this into a working MySQL select statement?

>SELECT * FROM products
>LEFT JOIN purchaserecords USING (productID)
>WHERE child.product_id IS NULL;

PB

Reply via email to