How to retrieve a second highest salary from a table?
Note:Suppose salaries are in duplicate values
eg:
Name Sal
Malli 60000
Pandi 60000
Rudra 45000
Ravi 45000
Answer Posted / rajat
SELECT * FROM (
SELECT RANK()OVER( ORDER BY SALARY DESC) NUM, A.* FROM RAJ A)
WHERE NUM=2;
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is nosql example?
What is the difference between null value, zero, and blank space?
What is rtm stands for?
what are string data types? : Sql dba
Is drop table faster than truncate?
describe transaction-safe table types in mysql : sql dba
What are basic techniques of indexing?
What found sql?
What is the difference between cross join and natural join?
Explain raise_application_error.
what is the use of double ampersand (&&) in sql queries?
What is package in pl sql with an examples?
What is indexes?
What is difference between inner join and self join?
what is a record in a database ? : Sql dba