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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
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: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> 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 <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > 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 <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> 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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to