更新时间:2022-11-27 19:46:49
尝试一下
SELECT @s:=@s+1 serial_number,student_id,student_name,student_avg FROM students, (SELECT @s:= 0) AS s WHERE student_avg > 4;
https://***.com/a/11096550/1423506
MySQL查询选择具有自动增量的结果作为结果中添加的新列