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
Answers were Sorted based on User's Feedback
Answer / sridhar
select gross_pay from tbl_payroll where gross_pay != (select
max(gross_pay) from tbl_payroll) limit 0,3
Is This Answer Correct ? | 0 Yes | 8 No |
Answer / rajeev
select salary-1 from users where salary in (select
max(salary) from users);
Is This Answer Correct ? | 0 Yes | 8 No |
Answer / ashish kumar
To find nth maximum salry
Select salary from tbl_name a where
n-1=(Select count(distinct(count(*))) from tbl_name b
where b.salary>a.salary)
Is This Answer Correct ? | 10 Yes | 20 No |
Answer / gunjan sapra
select top 10 from tbl_name order by salary desc
Is This Answer Correct ? | 4 Yes | 39 No |
what is replication? where do u use Go Keyword?
How to turn on the mssql api module in php?
Give an example of why you would want to denormalize a database
what is the difference between Delete and Truncate command in SQL
What are dml (data manipulation language) statements in ms sql server?
Explain what is the use of custom fields in report?
Do you know what is similarity and difference between truncate and delete in sql?
What is full outer join in sql server joins?
Why use stored procedures in sql server?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
what is a join and explain different types of joins? : Sql server database administration
Suppose you want to implement the one-to-many relationships while designing tables. How would you do it?