how to find the second highest salary from emp table?
Answer Posted / susanta
select * from emp e1 where N-1 =
(select count(distinct sal)
from emp e2
where e2.sal > e1.sal)
for Nth highest salary.
| Is This Answer Correct ? | 20 Yes | 11 No |
Post New Answer View All Answers
How do I view tables in mysql?
What does the base_object_type column shows in the user.triggers data dictionary view?
How do you add a column to a table?
what is the command line end user interface - mysql? : Sql dba
What is db journal file?
What is primary key and unique key?
Differentiate between syntax and runtime errors.
Determine if oracle date is on a weekend?
What port does sql server use?
How do you write a complex sql query?
What is sql in oracle?
What is sql injection vulnerability?
What is difference between sql and oracle?
What is primary and foreign key?
Can a table contain multiple foreign key’s?