write the query for find the top 2 highest salary in sql
server
Answer Posted / nilesh
select * from employee2 e where 2=(select count(distinct salary) from employee2
where e.salary<=salary)
Its working.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is log in sql server?
What is trigger and different types of Triggers?
What are the results of running this script?
What does the on delete cascade option do?
What is sql server database?
Explain about the command-line tool SQLCMD?
If you want to send some data from access database to sql server database. What are different component of ssis will you use?
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
What does top operator do?
Explain error handling in ssis?
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
Can you name some of the dml commands in sql?
hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.
What is provisioning, billing and metering, and connection routing concepts in the service layer?
What is the user of Primary key?