1.升序(asc)
select * from `students` order by `id` asc;
2.降序(dasc)
select * from `students` order by `id` desc;
3.排序(limit)
语法:limit 起始值,显示范围
例:select * from `students` limit 1,5;
补充:若第一页limit 1,5,则第二页6,5.....每页显示5行
2022-04-03 19:18:42
1.升序(asc)
select * from `students` order by `id` asc;
2.降序(dasc)
select * from `students` order by `id` desc;
3.排序(limit)
语法:limit 起始值,显示范围
例:select * from `students` limit 1,5;
补充:若第一页limit 1,5,则第二页6,5.....每页显示5行
下一篇:MySQL基础知识