8. Consider an Employee table with the following attributes Employee(EMPNO, ENAM
ID: 3588605 • Letter: 8
Question
8. Consider an Employee table with the following attributes Employee(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, DEPTNO) Find the query that is equivalent to the following query: SELECT el.empno, el.sal FROM emp el WHERE el.sal> ALL (SELECT e2.sal FROM emp e2 WHERE e2.deptno = 20); O a) SELECT el.empno, el.sal FROM emp el WHERE el.sal IN (SELECT e2.sal FROM emp e2 WHERE e2.deptno = 20); O b) SELECT el.empno, el.sal FROM emp el WHERE EXISTS (SELECT e2.sal FROM emp e2 WHERE e2.deptno = 20 AND el.salExplanation / Answer
C Select e1.empno, el.sal From emp e1 Where NOT EXISTS (select e2.sal FROM emp e2 WHere e2.deptno=20 AND e1.sal<=e2.sal);
is the answer because we need to get the value of salary emp from the table 2 and compare it so the only option is C where it takes the values of neglecting the higer values only the equal to values and remaining values are displayed which are gives the same value as the Question query
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.