Re: An small SQL problem
| From: | Davy Obdam | Date: | Sat, 12 Oct 2002 11:18:33 +0000 |
| Subject: | Re: An small SQL problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119728@lists.php.net to get a copy of this message | ||
Hi Christian,
I am not 100% sure cos i am doing this from my head but your SELECT query would have to look like this:
SELECT TableA.FieldA2 FROM TableA, TableB WHERE TableA.FieldA1 != TableB.FieldB2
btw. Wouldn`t be easier to use more informative Table and Field names..?
Hope it works,
Best regards,
Davy Obdam
mailto:info@davyobdam.com
Christian Ista wrote:
Hello, I'm probably sleepy because I can't do a very easy query. :( I have 2 tables TableA(FieldA1, FieldA2, FieldA3) and TableB(FieldB1, FieldB2, FieldB3). I'd like to see the TableA records (FieldA2) where the FieldA1(Primary key) not exist in TableB(FieldB2). I tried "not exists" without success. Could you help me ? Christian,