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
Differentiate pl/sql and sql?
what is meant by urlencode and urldocode? : Sql dba
Why do we use sql constraints? Which constraints we can use while creating database in sql?
How to order siblings in oracle hierarchy queries?
What is online transaction processing (oltp)?
What are the benefits of stored procedures?
Why having clause is used in sql?
What is the example of procedure?
How do I make my sql query run faster?
What are different types of queries in sql?
How do I view a sql trace file?
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
What is the source code of a program?
What are the subsets of sql?
What is a loop in sql?