Mysql find and incrementally number matching rows?
Posted on 2010-11-14
I have a table, 'answers' and a field on that table 'q_id', and another field 'num' (nothing is in 'num' right now).
Is there a way to run a query that will find all rows with matching 'q_id' and number them by putting 1 or 2 or 3 or 4 or 5, ... in the 'num' field? That way I can identify them even though the q_id is the same.
If possible, can you put it together for me please?
Thank you, Chris