I have some simple query:
SELECT foo, bar FROM table
i think you now whats the result looks like.
What I want to do is to show some
If somebody wants to display the row number after ordering records, something like this may work
set @a=0; select @a:=@a+1 serial_number,t.* from ( SELECT foo, bar FROM tableORDER BY bar ) t