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

What are the drawbacks of reporting in ssrs?

108


How do you manipulate data?

499


How do I get Report Builder to generate a parameter that can be set by users viewing the report?

100


What does it mean to manipulate data?

566


What can be used instead of trigger?

630






Explain the different index configurations a table can have?

512


How many database files are there in sql server 2000?what are they?

583


How can you tell if a database object is invalid?

619


Explain microsoft sql server functions?

543


Explain the steps to create and execute a user-defined function in the sql server?

532


How global temporary tables are represented and its scope?

551


What is the purpose of the master database?

602


Explain collation?

623


Can you pass expressions to stored procedure parameters?

507


How are the unique and primary key constraints different?

571