Write a query to find second highest salary of an employee.
Answer Posted / sathish p
select e1.* from (select ename,sal,rank()
over(order by sal) rank from emp) e1
where e1.rank=2;
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Which one is faster ienumerable or iqueryable?
What are analytical functions in sql?
What are the disadvantages of not performing database normalization?
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
how to increment dates by 1 in mysql? : Sql dba
what is the syntax used for partition in tsql? : Transact sql
explain the options of myisamchk to improve the performance of a table. : Sql dba
what are the different index configurations a table can have? : Sql dba
Can 2 queries be executed simultaneously in a distributed database system?
How many postgresql users are there, worldwide?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
What are the various restrictions imposed on view in terms of dml?
How to add a column ‘salary’ to a table employee_details?
how to include numeric values in sql statements? : Sql dba
how many ways to get the current time? : Sql dba