ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
数据抽出选项 === ## 知识点 - order by - limit - offset ## 实战 ``` > select * from users order by score asc; > select * from users order by score desc; > select * from users order by team; > select * from users order by team,score; > select * from users order by team desc,score desc; > select * from users order by score desc limit 3 offset 1; ``` ## 分页算法: ``` sql:`select * from tab_name limit 3 offset (1-1)*3`偏移数:计算 (page - 1) \* limit ```