新手求助,mysql怎么查一个数据是在表中的第几行

2025-03-06 07:33:20
推荐回答(1个)
回答1:

计算小于num=8的对应时间的行数

select count(*)+1 from tb where time<(select max(time) from tb where num=8)