How can get alternate highest salary or any record in a table in SQL Server ?

Total Post:87

Points:615
 405  View(s)
Ratings:
Rate this:

Get alternate records in a table like as 


Name RollNo Marks
A 1 40
B 2 50
C 3 55
D 4 48
E 6 66




how can get 2nd, 4th, and 6th position of marks ?

  1. Post:286

    Points:2044
    Re: How can get alternate highest salary or any record in a table in SQL Server ?

    USE DENSE_RANK FUNCTION for this operation. 

    MSSQL DENSE_RANK FUNCTION SYNTAX

    DENSE_RANK ( ) OVER ( [ <partition_by_clause> ] <order_by_clause> )

      Modified On Aug-06-2018 05:56:50 AM

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.