how to find the second highest salary from emp table?
Answer Posted / vijay kintali
select e1.ename,e1.sal from emp e1 where n=(select count
(distinct e2.sal) from emp e2 where e1.sal<=e2.sal);
Note:n here is nth highest salary.......
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is offset-fetch filter in tsql? : Transact sql
what is the syntax for using sql_variant_property? : Transact sql
what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
What is the sql*loader? : aql loader
How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?
What is sql integrity?
What are string functions in sql?
Which query operators in sql is used for pattern matching?
What is break?
What is program debugging?
What is number function in sql?
What is execution plan in sql?
What is a common use of group by in sql?
when MSQL8.0 is in market
Is left join inner or outer by default?