can anybody tell us, how to select 2nd max salary from table. my id is ashish.akk@gmail.com
select a.sal from emp a where 2=(select count(distinct b.sal) from emp b where a.sal<= b.sal) for getting nth max sal ..replace 2 by n all the best