mysql查询结果中添加序号
sql语句如下:select convert((@rowNO := @rowNo+1), signed) AS seq, a.* from login a, (SELECT @rowNo:=0) _rowNo
·
sql语句如下:
select convert((@rowNO := @rowNo+1), signed) AS seq, a.* from login a, (SELECT @rowNo:=0) _rowNo
select convert((@rowNO := @rowNo+1),signed) AS seq, t1.* from(
select a.pk, a.medicine_fk, a.medicineName,a.specification, a.unit, a.number, b.type, b.treatment, a.updateTime
from medicine_store a left join medicine b on a.medicine_fk=b.pk
order by a.updateTime desc
) t1, (SELECT @rowNo:=0) _rowNoowNo
更多推荐
已为社区贡献9条内容
所有评论(0)