Hi,
I use below query to get 2nd highest salary in employee table.
SELECT MAX(SALARY) FROM Employee WHERE SALARY < (SELECT MAX(SALARY) FROM Employee);
How do I get highest and 2nd highest salary with employee names separated by comma in single select statement. Output needed as below
Output:
EmpName1 - $5000, EmpName2 - $ 4500
'EmpName1' is employee with highest salary and 'EmpName2' is 2nd highest by salary. Thanks in advance.