SET @row_number = 0;
SELECT
(@row_number:=@row_number + 1) AS num from table
代替 Row_Number OVER()
07-03
389
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-20
1667
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-09
386
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
SET @row_number = 0;
SELECT
(@row_number:=@row_number + 1) AS num from table
代替 Row_Number OVER()