Simple SELECT problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello!

I have two tables. Both tables have a column named airplane_id. I want to
select those records in the first table with airplane_id's that do not appear
in second table!

This did not work out for me:

SELECT table1.airplane_id, table1.airplane_hours
FROM table1
WHERE table1.airplane_id <> table2.airplane_id

I get a dialog box asking me for parameters of table2.airplane_id. All
tables exist and every other query I made works flawlessly.
 
SELECT table1.airplane_id, table1.airplane_hours
FROM table1 LEFT JOIN table2
ON table1.airplane_id = table2.airplane_id
WHERE table2.airplane_id Is Null;
 
Back
Top