simple sql problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux