mysql> select table1.* from table1
           LEFT JOIN table2 ON table1.column_1=table2.column_2
           where table2.column_2 is NULL;

try this to select row of table 2 not in table 1, i think.

> Hi all,
>
> I want to get the difference between 2 tables.
>
> table_1:
> column_1
>   A
>   B
>   C
>   D
>
> table_2:
> column_2
>   B
>   C
>
> What is the sql select syntax to get as result A,D or B,C?
>
> Thanx for your help.
>
> Regards,
> Bernd
>
> ---------------------------------------------------------------------
> 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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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