×

Loading...

it's not correct

interview (intervieweree)
your query equals to this one

SELECT top 1 name, salary from employee WHERE salary NOT IN
( SELECT TOP 1 salary FROM employee ORDER BY salary DESC )
order by salary desc

but imagine if there are more than 1 people
have the same salary which is second highest?
your hardcoded number 2 does not work in thi situation
(#370411@0)
2002-2-15 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: here is the table, write a query to find out who have second highest salary?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论