Skip to content

Tag: oracle10g

SQL join to find relavant codes and address

Below table contain address information. Code Code1 Code2 Address DAN001 DAN004 DAN005 ABC, Newyork. DAN004 DAN004 DAN004 Delhi, India DAN005 DAN005 DAN005 Ever, Belgium Please find table details below: Each Code have associated code1 and code2 and address last column. for example: DAN001 is associated with D…

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? Answer There are two ways. LEFT JOIN NOT EXISTS