| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> SQL Unmatched records Question
Hi again,
I have two tables in an Oracle database and I want to display all the records in one table which are NOT in the other table. Let me explain using the schema below:
Seats(SeatID) which ranges from 1 to 10. {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} SoldSeats(FlightID, SeatID) which defines which seats have been sold for a particular flight.
So for example, if seats 1,2,3 have been sold for FlightID 100 then I would want it to return
100 4
100 5
100 6
100 7
100 8
100 9
100 10
But if a seat has been sold in another Flight, then it shouldnt affect Flight 100's results. So what is the SQL Query to do something like this?
Thanks,
Charcoal Received on Sat May 12 2001 - 10:09:46 CDT
![]() |
![]() |