List:General Discussion« Previous MessageNext Message »
From:iConnect \(Berlin\) Stefan Hinz Date:December 9 2002 10:01pm
Subject:Re: help on NOT EXISTS SQL query
View as plain text  
Dear Murad,

> I know you can emulate an 'exists' subquery with a join. but I just
> can't think of a way to emulate a 'not exists' without a subquery.
> probably due to my limited sql experience. any hints?

You have probably tried something like SELECT ... WHERE <condition> IS NOT
NULL. To emulate a "not exists" subselect, you would use SELECT ... WHERE
<condition> IS NULL.

> BTW: when do you think mysql 4.1 would be stable enough for robust use

As I hear, MySQL 4.1-alpha will be released very soon, probably in January.
My guess for MySQL 4.1-gamma (the release declared as stable, meaning there
are lots of installations in production environments that have proven
stable) is August 2003. Any other guesses? Monty? ;-)

Regards,
--
  Stefan Hinz <hinz@stripped>
  CEO / Geschäftsleitung iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3


----- Original Message -----
From: "Murad Nayal" <mn216@stripped>
To: "MySQL List" <mysql@stripped>
Sent: Monday, December 09, 2002 4:37 PM
Subject: help on NOT EXISTS SQL query


>
>
> Hello all,
>
> I need to run query like (in mysql < ver.4):
>
> select * from table1 as t1 where not exists (select NULL from table2 as
> t2 where t1.field1 = t2.field1)
>
> I know you can emulate an 'exists' subquery with a join. but I just
> can't think of a way to emulate a 'not exists' without a subquery.
> probably due to my limited sql experience. any hints?
>
> thanks a lot
> Murad
>
> BTW: when do you think mysql 4.1 would be stable enough for robust use
> (not necessarily mission critical).
>
> ---------------------------------------------------------------------
> 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 <mysql-thread127012@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-list_hinz=iconnect.de@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

Thread
help on NOT EXISTS SQL queryMurad Nayal9 Dec
  • RE: help on NOT EXISTS SQL queryAdolfo Bello9 Dec
    • Re: help on NOT EXISTS SQL queryMurad Nayal10 Dec
    • Multiple MySQL db's on one machinetmb10 Dec
      • Re: Multiple MySQL db's on one machinePaul DuBois10 Dec
        • Re: Multiple MySQL db's on one machineMichael T. Babcock10 Dec
    • Multiple MySQL db's on one machinetmb10 Dec
    • Re: help on NOT EXISTS SQL queryMurad Nayal10 Dec
  • Re: help on NOT EXISTS SQL queryMurad Nayal10 Dec
  • Re: help on NOT EXISTS SQL queryiConnect \(Berlin\) Stefan Hinz10 Dec
Re: Multiple MySQL db's on one machineJan Steinman10 Dec