Can someone suggest innovative queries for selecting the 2nd highest salary, from a table "EMP" which consists of three "NOT NULL" fields, sal(salary), name, empno(employee number) ?
I have one:
Select sal
from EMP A
where 1 = (select count(DISTINCT SAL) from EMP B whre A.sal < B.sal);
select DISTINCT sal
from emp a
where 1 = (select count(DISTINCT sal) from emp b where a.sal < b.sal);