simple sql problem
| From: | Merlin | Date: | Fri, 25 Jul 2003 08:03:49 +0000 |
| Subject: | simple sql problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29468@lists.php.net to get a copy of this message | ||
Hello ,
I have a sql problem which seems to be simple, but I am kind of stuck,
There are 2 tables with IDs. I would like to find out which ID from table
one is not in table 2.
My statement:
SELECT ap. *
FROM pictures p , album_pictures ap
WHERE ap.pic_id != p.pic_id
returns of course all the ids from table pictures which are not in table
album_pictures, but I would like to have
it the other way arround.
Can anybody help on this.
Thanx a lot in advance for any help,
Merlin