How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database
plz mail the answer @ mak2786@gmail.com
Answer Posted / subhranghshu bhattacharjee
first find second largest salary in the emp database:
select min(sal)sal from(select sal from emp order by sal
desc)
where rownum<3
u can find 3rd,4th... so on ,only change rownum
like rownum<4,rownum<5 ... so on
| Is This Answer Correct ? | 10 Yes | 8 No |
Post New Answer View All Answers
What do you understand by recursive stored procedures?
Write a query to find 5th highest amount paid from the customer table.
Mention the differences between sql server and mysql.
What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
What is schemabinding a view?
Explain for xml explicit mode?
How can I know what locks are running on which resource?
What is a with(nolock)?
mention different types of relationships in the dbms?
What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?
Why do we use sql limitations? Which constraints can we use while making a database in sql?
Explain the use of keyword with encryption. Create a store procedure with encryption?
Write an sql query to sort a table according to the amounts in a row and find the second largest amount.
What are the restrictions that views have to follow? : SQL Server Architecture
Is it possible to call a stored procedure within a stored procedure?