解决方法是通过预定义用户变量来实现:
代码如下:
set @mycnt = 0;
select (@mycnt := @mycnt + 1) as ROWNUM , othercol from tblname order by othercol;
代码如下:
set @mycnt = 0;
select * from (
select (@mycnt := @mycnt + 1) as ROWNUM , othercol
from tblname order by othercol
) as A where othercol=OneKeyID;
Copyright © 2019- gamedaodao.net 版权所有 湘ICP备2024080961号-6
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务