Skip to content
Advertisement

Oracle Why Exists Query Returns This Result

I am confusing using exists to compare two data between two tables. I am expecting to get 0 rows from query but it returns some data. I don’t know why.

This query returns all of them above. I am trying to get differences. These columns are foreign keys of some other tables. Can it related with other table’s records?

Thanks in advance.

Advertisement

Answer

You can use a full join to get mismatches:

This will show the pairs that are in one table but not the other.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement