Sunday, May 29, 2011

.NET and SQL Server interview questions - Show SQL query in order to obtain names of employees with top 10 salaries?


Let’s see a simple example to see, how exactly we can obtain entire employee
name who obtains top 10 salaries.

Assuming that we have following table for Employee.


select Employee.EmpName,Employee.EmpSalary from Employee where Employee.EmpSalary in
(select distinct top(10)Employee.EmpSalary from Employee order by Employee.EmpSalary desc)


You will be also interested in watching the below video, which are also
asked in most of the interviews and favourable question of interviewers.

Please click here to see more .NET and SQL Server interview questions


Visit Authors blog for more .NET and SQL Server interview Question

No comments: