On Thu, 19 Apr 2001, Agustin Eloy Barrios Arteaga wrote:

> I need translate this SQL to any SQL that work in MYSQL
> 
> SELECT * FROM cons WHERE NOT EXISTS (SELECT idc FROM cp  where
> cons.id=cp.idc and cp.idp = 1);
> 

I think it'd be:
SELECT * from cp LEFT JOIN cons ON cp.idc=cons.id WHERE cp.idp=1 AND cons.id IS NULL;


regards,
thalis


---------------------------------------------------------------------
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