find Nth highest salary of employee by procedure Written by Suresh Sharma on April 11, 2008 in Sql Server with No comments [sourcecode language="sql"]Create proc GetNthmaxsalary(@high int)asset nocount onSELECT TOP 1 emp1.salary FROM ( SELECT DISTINCT TOP @high salary FROM emp ORDER BY salary DESC) as emp1 ORDER BY emp1.salarygo}[/sourcecode] Share: Email ThisBlogThis!Share to XShare to Facebook
0 Comments:
Post a Comment