Skip to content
Advertisement

How to simplify nested select in where clause?

I have 4 tables EMPLOYEE, COMPANY, WORKS and MANAGES. The tables are defined as follows-

I need to find all the employees who live in the same city as the company for which they work. So far I have done this.

It’s working fine. But I want to know is there any simpler way to do this query?

Advertisement

Answer

You could use an explicit inner join instead of nested subselect

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