how to get second highest salary in SQL(as/4000
Answer Posted / raji_4u
select *
from emp e1
where 2 = ( select count(distinct sal)
from emp e2
where e1.sal <= e2.sal
)
Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Does truncate need commit?
What is a procedure in pl sql?
Does sql use python?
What is the difference between drop and truncate commands?
What is blind sql injection?
What is anonymous block in sql?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
What is the difference between inner join and outer join?
What is record variable?
How do you get column names only for a table (sql server)?
What is thread join () in threading?
What is an alias command?
what is rollback? : Sql dba
What is the usage of nvl function?
What is materialized view. What are different methods of refresh?