Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / hasnain hameed
select max(salary)
from emp
where salary < (select max(salary) from emp)
order by salary desc;
i think this is correct answer all of above because it take
less time to execute. retrive the answer quickly.
Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
Determine if oracle date is on a weekend?
List the ways to get the count of records in a table?
What does over partition by mean in sql?
what are ddl statements in mysql? : Sql dba
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
What is %type in sql?
What is ttitle and btitle?
Is sql procedural language?
Does view store data in sql?
What is the maximum database size for sql express?
How many types of triggers exist in pl/sql?
How can you select unique records from a table?
What is normalization in a database?
how to delete an existing column in a table? : Sql dba
What is structural independence and why is it important?