-- 查询时增加自动编号 Select (Select sum(1) from TableName where id<= a.id) as iid,* from TableName a ---- 来自jb51.cc