Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / rajesh
Guess this works...
select max(sal)
from (select * from emp
where sal not in (select max(sal) from emp))
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What will you get by the cursor attribute sql%notfound?
1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What are triggers and its types?
Why is stored procedure faster than query?
Explain unique key in sql.
What is attribute indicator in pl sql?
What is data types in sql?
What is sql server and ase?
What are the advantages of normalization?
What is difference between stored procedures and application procedures?
What is clause?
What is exception? What are the types of exceptions?
What is sql select statement?
what is dbms? : Sql dba