[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question about NOT IN
Subqueries like that won't work until version 4.0.
for now it's rather ugly and inefficient, but one way you could do it would
be like this:
select table1.*, ifnull(table2.column2,-1) as marked from table1 left join
table2 on table1.column1=table2.column2 having marked=-1
I've done something similar before, and it worked ok. Of course having
subqueries will be nice.
----- Original Message -----
From: "Carl Karsten" <carl@xxxxxxxxxxxxxxxxx>
To: <mysql@xxxxxxxxxxxxxxx>; <mysql@xxxxxxxxxxx>
Sent: Friday, March 16, 2001 12:13 AM
Subject: Re: question about NOT IN
> select * from table1 where column1 not in (select column2 from table2)
>
> ----- Original Message -----
> From: <mysql@xxxxxxxxxxx>
> To: <mysql@xxxxxxxxxxxxxxx>
> Sent: Thursday, March 15, 2001 7:13 PM
> Subject: question about NOT IN
>
>
> > Please I would want how I can get the list of records from a
> > table1 that do not appears on a table2, supossing a column
> > e.g code is used as connector or joiner present at both
> > tables;
> >
> > Thanks
> >
> >
> > Ernesto
> >
> > ---------------------------------------------
> > Este mensaje fue enviado a través de Qnet
> > http://www.qnet.com.pe
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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-thread68406@xxxxxxxxxxxxxxx>
> > To unsubscribe, e-mail
> <mysql-unsubscribe-carl=personnelware.com@xxxxxxxxxxxxxxx>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
> ---------------------------------------------------------------------
> 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-thread68416@xxxxxxxxxxxxxxx>
> To unsubscribe, e-mail
<mysql-unsubscribe-jason=appliediq.com@xxxxxxxxxxxxxxx>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
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-thread68418@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.