select count(*),t1.`name` from test_id t1
INNER JOIN test_id t2
on t1.id >= t2.id
group by t1.id,t1.`name`
HAVING count(*) < t1.id
order by t1.id
limit 1;
select * from test_id;
表结构看上一篇
时间: 2024-10-06 04:37:09
select count(*),t1.`name` from test_id t1
INNER JOIN test_id t2
on t1.id >= t2.id
group by t1.id,t1.`name`
HAVING count(*) < t1.id
order by t1.id
limit 1;
select * from test_id;
表结构看上一篇