Skip to content
Advertisement

Oracle: Id Not in another table

I have following two tables, airport and flying

I would like to get airport_id where flying_id present in flying table but not present in airport table. I rote the following query using nested select query. Is there anyway I can improve without writing nested?

Advertisement

Answer

There are two ways.

  • LEFT JOIN
  • NOT EXISTS
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement