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 inOUTPUT:-
(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.
Asked In: Many Interviews |