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
When do we use triggers?
Write a query to find the names of users that begin with "um" in sql?
What are inner and outer joins examples of both?
Explain the structure of pl/sql in brief.
How do I write a cron which will run a sql query and mail the results to agroup?
What is update query?
Mention what plvcmt and plvrb does in pl/sql?
What is anonymous block in sql?
What does select * from mean in sql?
Why do we use view in sql?
How can we store rows in PL/SQL using array?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
What are different types of sql commands?
Why is sql better than hql?
Which is the correct statement about truncate and delete?