Write a query to find second highest salary of an employee.
Answer Posted / gvmahesh
I write the query for this question using OLAP functions.
select e1.* from (select ename,sal,rank()
over(order by sal desc) rank from emp) e1
where e1.rank=2;
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Why is sql*loader direct path so fast?
What are tables and fields?
What if we write return in procedure?
What is posting?
Is it important to partition hard disk?
how tsql statements can be written and submitted to the database engine? : Transact sql
Why is a primary key important?
Does asenumerable execute the query?
How to pronounce postgresql?
How many developers work on postgresql?
What are the advantages of pl sql?
What is an alias command?
Is it possible to read/write files to-and-from PL/SQL?
How to avoid duplicate records in a query?
Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.