Hello.

On Wed 2002-08-21 at 16:49:06 -0400, [EMAIL PROTECTED] wrote:
> 
> I need to figure out values in a column of a given table that do not 
> exist in a a column of another given table without subselects.
> 
> For example:
> 
> If I have one table called "TABLEA" with column name "id" and values 
> "1,2,3,4,5,6,7",
> 
> and another table called "TABLEB" with column name "id" and values "3,4,5".
> 
> Is there any select statement I can do, which will return records in 
> TABLEA with id values "1,2,6,7"?
> 
> With subselects you could do it as such:
> "select id from TABLEA where id NOT IN select id from TABLEB"
> 
> How can I do it in versions of MySQL that don't have subselects 
> (multiple steps is fine)?

Well, that is explained in the manual section about missing
sub-selects (it even contains almost exactly your query as example):

  http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html

Bye,

        Benjamin.

-- 
[EMAIL PROTECTED]

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