SQL Server: position based on marks
Posted
by Rhys
on Stack Overflow
See other posts from Stack Overflow
or by Rhys
Published on 2010-05-05T19:38:15Z
Indexed on
2010/05/05
19:48 UTC
Read the original article
Hit count: 454
I am using SQL Server 2008. I have a Student table in which there are following fields: 1. StudentId, 2. StudentName, 3. Marks . I want to get a resultset in which there should be a column named “Position”. Something like “Select StudentId,StudentName,Marks, as Position from Student...” so that, depending on the marks a student scored, i can evaluate them as the 1st, 2nd or 20th position. If students have the same marks, then they have the same position. Thanks. Rhys
© Stack Overflow or respective owner