how to find the second highest salary from emp table?
Answer Posted / shalina bajaj
select sal from emp a
where $number = (select count(distinct(sal))
from emp b
where a.sal <= b.sal);
Is This Answer Correct ? | 11 Yes | 17 No |
Post New Answer View All Answers
What is trigger and how to use it in sql?
What is the maximum size of sqlite database?
What is mutating sql table?
What is cte sql?
What is indexing oracle sql?
how to create a new table by selecting rows from another table in mysql? : Sql dba
Can we use having without group by in sql?
What is sqlerrm?
What is the use of %rowtype?
What is the purpose of a sql?
Is not null in sql?
What is meant by <> in sql?
Does sql support programming?
Explain normalization and what are the advantages of it?
Which is better trigger or stored procedure?