Return to Snippet

Revision: 2309
at February 1, 2007 07:13 by olive


Initial Code
SELECT table1.* FROM table1 LEFT JOIN table2 ON table1.name=table2.table1_name WHERE table2.table1_name IS NULL;

Initial URL

                                

Initial Description
I Have two tables table1, table2

table 1 contains rows not in table 2 how do i get a list or rows not in table 2

table 1

name    desc
1             a
2             b
3             c

table 2

table1_name    desc
1                         z
3                         x

I would like to select just row 2 from table 1.

Initial Title
Enregistrement présent dans table1 mais pas dans table2

Initial Tags

                                

Initial Language
SQL