select * from table1 a left join table2 on a.fieldname=b.fieldname where b.fieldname is null