SELECT * FROM tableA left join tableb on tablea.prod_id = tableb.prod_id
where tableb.prod_id is NULL;

-----Original Message-----
From: BD [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 15 February 2001 15:16
To: [EMAIL PROTECTED]
Subject: Simple Query


For a database cleanup project...

Table A: prod_id, prod_desc
Table B: prod_id, prod_price, (and various other fields)

Would like to come up with a query that will give me a list of all rows in
Table A that don't exist in Table B... I've tried several different ways,
but can't seem to come up with one that works...?

TIA


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

The information contained in this email is privileged and confidential
and intended for the addressee only. If you are not the intended 
recipient, you are asked to respect that confidentiality and not 
disclose, copy or make use of its contents. If received in error 
you are asked to destroy this email and contact the sender immediately. 
Your assistance is appreciated.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to