mysql 查找结果中自动加序号列

select (@rowNO := @rowNo+1) AS rowno,`CODE`  from (
select `CODE`  from tms_order
)a ,(select @rowNO :=0) b  

预览:



 

猜你喜欢

转载自minyongcheng.iteye.com/blog/2069126
今日推荐