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
What is rtm stands for?
What is bind variable in pl sql?
1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins
What are the types of keys?
What are literals in sql server?
What is an invalid partition table?
How to connect a sql*plus session to an oracle server?
Which one is better subquery or joins?
What is natural join in sql?
how to select unique records from a table? : Sql dba
What is a temporal table?
How do I enable sql encryption?
Explain ddl statements in pl/sql?
Does truncate require commit?
How many tables can a sql database have?