oracle中可以用rownum带行号输出,例如:select rownum,u.name,u.age from user u;
但是mysql里面没有rownum,所以怎么办嗯?
办法:SELECT @rownum:[email protected]+1 AS rownum, user.* FROM (SELECT @rownum:=0) r, user;
原文地址:https://www.cnblogs.com/hyc-go/p/11126462.html
时间: 2024-10-10 04:14:22