how to find the second highest salary from emp table?
Answer Posted / rahul thakur
select top 1 salary from emp where id not in (select top1 id from emp order by salary desc)order by salary desc.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a file delimiter?
Explain scalar functions in sql?
Why having clause is used in sql?
What are the rules to be applied to nulls whilst doing comparisons?
Lookups are a key component in sql server integration services (ssis). Explain its purpose?
Can %notfound return null after a fetch?
What is raid? How does it help storage of databases?
How do I view stored procedures?
what are myisam tables? : Sql dba
What are local and global variables and their differences?
What is example of database?
what is 'trigger' in sql? : Sql dba
Can you select everything, but 1 or 2 fields, without writer's cramp?
Explain the the update statement in sql?
What is a recursive stored procedure?