Write a query to get all details of employee who has maximum
salary from employee table

Answer Posted / mithilesh gatole

Answer -

SELECT FROM Employee Emp1 WHERE (N-1) = ( SELECT COUNT(DISTINCT(Emp2.Salary)) FROM Employee Emp2
WHERE Emp2.Salary > Emp1.Salary)

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the definition of a view out of the sql server?

495


Is foreign key unique?

568


What is a trace frag? Where do we use it?

669


How secure is sql server database?

521


What is query cost in sql server?

548






Can We Use Data-grids For Our Report In Ssrs?

147


What is Federation and Federation Member?

80


Differentiate between a having clause and a where clause.

515


What specific conditions database should meet, before you can bulk copy data into it using bcp?

532


What are date and time data types in ms sql server?

520


What are the different types of columns types constraints in the sql server?

520


How many types of triggers in sql server?

516


What is it unwise to create wide clustered index keys?

576


What is data set in report?

95


Can you tell me some of the common replication dmv's and their use? : sql server replication

528