Link to home
Start Free TrialLog in
Avatar of jacobbdrew
jacobbdrew

asked on

How Do I include the current row in a mysql select statement

Hi Experts--

The question title says it all. basically i have a list of scores, i want to select them in order and add a rank column to the result. something like this:

SELECT score, CURRENT_ROW as 'rank'
FROM tbl_scores
ORDER BY score

i don't think CURRENT_ROW is actually a variable in MySQL. I need to know what to use in it's place

-thanks

jacob



SOLUTION
Avatar of nguyenvinhtu
nguyenvinhtu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial