Select distinct (a.Sal) from emp a where &n = (select count (distinct (b.Sal)) from emp b where a.Sal < = b.Sal);for eg:-enter value for n: 2sal---------3700
Answered by: bhavikgore on: Oct 27th, 2012
This will work for only highest salary n=1 but not work for 2nd and rest nth salary...
Did you have tried this?
This will work for only highest salary n=1 but not work for 2nd and rest nth salary...
Did you have tried this?