| |
GeekInterview.com > Interview Questions > Database > SQL
| Print | |
Question: Find second lowest salary from emp table
Answer: display the second lowest salary from emp table without using min & all |
| May 05, 2008 14:39:22 |
#1 |
| aleeza |
Member Since: May 2008 Total Comments: 2 |
RE: Find second lowest salary from emp table |
| select min(sal) from emp where sal=(select sal from emp where sal<>MIN(SAL) ) ORselect min(sal) from emp where sal=(select sal from emp having sal<>MIN(SAL) ) May this will help you.I have not tested it in SQL and I am also not sure that the syntax is exactly right .may be you need to do same changes |
| |
Back To Question | |