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 4 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 4 years ago

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