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

Total Post:24

Points:170
 189  View(s)
Ratings:
Rate this:

Get alternate records in a table like as 


NameRollNoMarks
A140
B250
C355
D448
E666




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

  1. Post:280

    Points:1994
    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
  1. Post:1

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

    Post is removed by the Admin.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!