List:MySQL on Win32« Previous MessageNext Message »
From:sinisa@mysql.com Date:April 6 2000 11:31am
Subject:Re: NOT IN SQL command.
View as plain text  
On Wed, 05 Apr 2000, Paul DuBois wrote:
>At 2:18 PM +0300 2000-04-05, sinisa@stripped wrote:
>>On Tue, 04 Apr 2000, Shail Dahal wrote:
>>>Can we have similar command in mysql for this
>>>
>>>select col1 from tab1 where col1 NOT IN (select col1 from tab2);
>>>
>>>TIA.
>>>
>>>--Shail Dahal
>>>
>>>
>>>Shail Dahal
>>
>>HI!
>>
>>It is on our TODO list. For the moment you can replace the above with:
>>
>>select tab1.col1 from tab1,tab2, where tab1.col1 != tab2.col1;
>>
>>
>>Regards,
>>
>>Sinisa
>
>
>Isn't this one of those LEFT JOIN situations?
>
>SELECT tab1.col1 FROM tab1 LEFT JOIN tab ON tab1.col1 = tab2.col1
>     WHERE tab2.col1 IS NULL;
>
>
>This assumes that tab2.col1 is defined as NOT NULL in the table
>definition, though.
>
>-- 
>Paul DuBois, paul@stripped

Hello Paul,

I think this is more of a typical teta join ten left join.

Regards,

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped     |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+
Thread
NOT IN SQL command.Shail Dahal4 Apr
  • Re: NOT IN SQL command.Steve Ruby4 Apr
  • [META] Re: NOT IN SQL command.Phlip4 Apr
  • Re: NOT IN SQL command.sinisa@mysql.com5 Apr
    • Re: NOT IN SQL command.Paul DuBois6 Apr
      • Re: NOT IN SQL command.Shail Dahal6 Apr
      • Re: NOT IN SQL command.sinisa@mysql.com6 Apr
  • Re: NOT IN SQL command.Jeffrey Thompson5 Apr