8
Reply

Find 5th Highest salary in LinQ , SQL server, write code in C# 2.0. Is there any inbuilt function in C# which can give us direct output as Highest 5th Salary.?

Vivek Sheth

Vivek Sheth

Dec 15, 2015
1.5k
0

    Select*from (Select EmpId,EmpName,salary,row_number() over(order by salary desc) rowno from Tbl_SalaryProcess)Q1 where Q1.rowno=5

    RajaGopal Gce
    March 06, 2017
    0

    select top 1 sal from (select top 5 sal from emp order by sal desc) e order by sal asc

    Parmsh M
    January 25, 2017
    0

    Check this link : http://www.c-sharpcorner.com/blogs/experiment-with-nth-highest-or-lowest-salary-or-record-in-sql

    Vimal Lohani
    January 15, 2017
    0

    SELECT TOP(1) EMPNAME,MAX(SALARY) SALARY FROM tblname GROUP BY EMPNAME ORDER BY salary DESC

    Hitendra kumbhar
    December 17, 2016
    0

    ??? runman7942.com ?? ???? ???? ?? ????

    Jiseo Lee
    October 18, 2016
    0

    select top(1) Salary from ( select distinct top(5) Salary from tblEmployee order by Salary DESC )as Temp order by Salary ASC

    with Cte as ( Select name,address,Dense_rank()over(partition by salary order by salary )r as rank from emp ) select top 1 * from Cte from where rank=5

    Khajahaneef Shaik
    June 05, 2016
    0

    DataContext context = new DataContext(); var q= context.tblEmployee.GroupBy(ord => ord.Salary) .OrderByDescending(f => f.Key) .Skip(4) .First() .Select(ord=>ord.Salary) .Distinct();

    Mayur Gujrathi
    February 23, 2016
    0