How to display employee name, dept name, salary and comm for those sal in between 2000 to 5000 while location is Chicago?

Oracle Apps Interview QuestionsCategory: SQLHow to display employee name, dept name, salary and comm for those sal in between 2000 to 5000 while location is Chicago?
Questions Master asked 9 years ago

How to display employee name, dept name, salary and comm for those sal in between  2000 to 5000 while location is Chicago?

1 Answers
Shailender Thallam Staff answered 9 years ago

SELECT ename,
  dname,
  sal,
  comm
FROM emp,
  dept
WHERE sal BETWEEN 2000 AND 5000
AND loc       =’CHICAGO’
AND emp.deptno=dept.deptno;