The EMP_ID is the primary key for Employee, DEPT_NO is the primary key for…

The EMP_ID is the primary key for Employee, DEPT_NO is the primary key for Department, and DEPT_ID is the foreign key for Employee referencing DEPT_NO in Department table.
Which of following query display the name of the employees who gets more salary than the employee with ID 7700.
- A.
SELECT Emp_Name FROM Employee WHERE salary > (SELECT salary FROM Employee WHERE Emp_ID = 7700);
- B.
SELECT Emp_Name FROM Employee el WHERE salary > (SELECT salary FROM Employee e2 WHERE Emp_ID = 7700 AND e2. salary > el.salary) ;
- C.
SELECT Emp Name FROM Employee el WHERE el. Emp ID = 7700 AND EXISTS (SELECT * FROM Employee e2 WHERE e2.salary > el.salary) ;
- D.
(d) Both a and c
Attempted by 400 students.
Sign up free to check your answer
Sign up freeLoading lesson…

