如何取得数据库中ID最大的那一条数据
c 2023-06-07 15:44:55 发表在:SQL 查看数:1197

如何取得数据库中ID最大的那一条数据

select * from title order by id desc limit 1;根据id降序,取第一条。
select * from title where id = (select max(id) from title);用子查询先取的最大id
最近访问时间:2025-05-01 01:28:34
知识库:340条鸣谢:TAY  备案号:蜀ICP备2024090044号