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 |
How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?
Can you name a few encryption mechanisms in sql server?
what are the limitations of parameters in a storedprocedure
Explain the concept of view and Types of views in SQL server?
Explain about link server in sql server?
Advantages and disadvantages of stored procedures.
Explain primary key and foreign key constraints?
what is hash table
How to remove duplicate rows from table?
Write a sql query to delete duplicate records from a table called table1
How to convert a table data in XML format in sql server?
What are different types of views?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)