Your Ad Here

Posted By

olive on 02/01/07


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

basicmagic


Enregistrement présent dans table1 mais pas dans table2


 / Published in: SQL
 

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.

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

Report this snippet  

You need to login to post a comment.