MySQL中删除id为最小的数据

2025-3-26 / 0 评论 / 3 阅读

//方法1

 delete from 表名<span> </span>where id<span> </span>in (select id<span> </span>from (select min(id) id<span> </span>``from 表名 c1) t1);

//方法2

delete from 表名<span> </span>order by id<span> </span>asc limit 1;