SELECT t.*,
@RowNum := @RowNum + 1 AS RowNum FROM t,
(SELECT @RowNum := 0) AS myRows
MySQL中没有ROW_NUMBER()函数,可以用以上代码替换。
2022-07-09 07:31:52
SELECT t.*,
@RowNum := @RowNum + 1 AS RowNum FROM t,
(SELECT @RowNum := 0) AS myRows
MySQL中没有ROW_NUMBER()函数,可以用以上代码替换。