分页SQL_MySQL分页sql

1、查符合条件的数据总条数

select COUNT(1)
 from
    表
where 条件

2、分页sql

select * from 表 where 条件 order by 排序条件 limit m, n;

 

posted @ 2022-10-12 11:40  ꧁执笔小白꧂  阅读(59)  评论(0)    收藏  举报