MySQL语法

MYSQL模拟生成一列自增序号。

SELECT (@i:=@i+1) AS rownum,t.* FROM syslog t,(SELECT @i:=0) AS it;

原文地址:https://www.cnblogs.com/dll102/p/14210706.html