Find out the 3rd highest salary?
Answer Posted / priyanga.g
1) Select MAX(salary) from Programmer where salary not
in(select top 2 salary from Programmer order by salary desc)
2) Select max(salary) from programmer where salary<
(select MAX(salary) from Programmer where salary<(select
MAX(salary) from Programmer))
3) Select MAX(salary) from Programmer e where 2=(select
COUNT(*) from programmer b where b.salary>e.salary )
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to place comments in pl/sql?
What is %rowtype in pl sql?
What are the advantages of pl sql over sql?
What is trigger with example?
what happens if null values are involved in expressions? : Sql dba
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
Why do we need view in sql?
Why is theta join required?
How do I pipe the output of one isql to another?
What is update query?
Can instead of triggers be used to fire once for each statement on a view?
What are conditional predicates?
What is sql catalog?
what is log shipping? : Sql dba
Lookups are a key component in sql server integration services (ssis). Explain its purpose?