how to find the second highest salary from emp table?
Answer Posted / ashwini
select top 1 salary from emp where salary in (select top 2
salary from emp order by salary asc) order by salary desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the maximum rows in csv?
Why do we use joins in sql?
What is a database trigger?
What are analytic functions in sql?
Is there any restriction on the use of union in embedded sql?
What is indexing in sql and its types?
What is group by in sql?
What is rank () in sql?
What is bulk collect in pl sql?
Is left join and outer join same?
What is asqueryable?
what is the difference between a web-garden and a web-farm? : Sql dba
How much does a sql dba make? : SQL DBA
What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql
What is union and union all keyword in sql?