Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7630987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:14:16+00:00 2026-05-31T06:14:16+00:00

I m Looking for ways to assign the row numbers as below for the

  • 0

I m Looking for ways to assign the row numbers as below for the table

Roll No    Name    Score 
 1           ABC    10
 1           ABC    10
 1           DEF     8
 2           ASC     9
 2           YHN     4
 3           IOP     5
 3           YHN     4

I m looking for a way to assign the roll no as Rownumber()

Roll No    Name    Score    Row_Number
 1           ABC    10        1
 1           ABC    10        2
 1           DEF     8        3
 2           ASC     9        1
 2           YHN     4        2
 3           IOP     5        1 
 3           YHN     4        2

I m trying to work around with Row_number() , it is isnt working . ANy inputs on this world be great 🙂

Thanks !!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:14:17+00:00Added an answer on May 31, 2026 at 6:14 am
    SELECT [Roll No], Name, Score, [ROW_NUMBER] = 
      ROW_NUMBER() OVER (PARTITION BY [Roll No] ORDER BY Score DESC)
    FROM dbo.table
    ORDER BY [Roll No], [ROW_NUMBER];
    

    If you later decide that you want to handle ties in a different way, play with using RANK() or DENSE_RANK() in place of ROW_NUMBER()…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking at ways to make a table have a fixed header especially
I'm looking for ways to display a single row of data as a single
While looking for ways to find the size of a file given a FILE*
I am looking for ways that someone could maliciously pause a Flash movie -
I'm looking for ways to express this Python snippet in Perl: data = {A:
I'm currently looking at ways to allow people to select multiple files at once
I am looking at ways to make our application more extensible and easier to
I am looking at ways of limiting data (pages) visible to users based on
I'm looking for ways to speed my program to the max and one way
I've been looking into ways to compress PHP libraries, and I've found several libraries

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.