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 / ashok
select sal from emp order by sal desc offset 1 rows fetch next 1 rows with ties;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Which are the different case manipulation functions in sql?
How do you create a unique index?
Is mariadb nosql?
What's the difference between inner join and left join?
What is synonyms?
What is normalization in a database?
What is procedure in pl sql?
How do I write a sql query in pgadmin 4?
Can we delete column in sql?
Can we use having without group by in sql?
how to use in conditions? : Sql dba
What are % type and % rowtype?
What is sql catalog?
Is oracle and sql same?
How many types of sql are there?