1.不排序
语句:
SELECT (@rowNum:=@rowNum+1) AS rowNo,bigquestion.bigQuestionSequence FROM (SELECT (@rowNum :=0) ) b,bigquestion
结果:
2.排序的
语句
select (@rowNum:=@rowNum+1) as rowNo,bigquestion.bigQuestionSequence from (Select (@rowNum :=0) ) b,bigquestion order by bigquestion.bigQuestionSequence
结果: