mysql limit 执行后没有效果

fengda2870 2010-11-24 11:37:27
这两句SQL语句的执行结果是一样的不知道怎么回事

数据库:mysql5.0



select pid from cdb_posts limit 0,10;
+-----+
| pid |
+-----+
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12 |
| 13 |
| 101 |
| 102 |
+-----+

select pid from cdb_posts limit 5,10;
+-----+
| pid |
+-----+
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12 |
| 13 |
| 101 |
| 102 |
+-----+

不知道何故
如何解决!


网上找了很多的资料
都是关于优化的
加了order by 结果还是一样

mysql> select pid from cdb_posts order by tid desc limit 5,10;
+-----+
| pid |
+-----+
| 183 |
| 182 |
| 181 |
| 180 |
| 179 |
| 178 |
| 177 |
| 176 |
| 188 |
| 189 |
+-----+
10 rows in set
...全文
107 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
fengda2870 2010-11-24
  • 打赏
  • 举报
回复
我找到一篇详解
http://www.lsffractal.com/post/17.html
ACMAIN_CHM 2010-11-24
  • 打赏
  • 举报
回复
[Quote]原来是我自己错了
limit的基本用法都不会[/Quote]

MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
ACMAIN_CHM 2010-11-24
  • 打赏
  • 举报
回复
fengda2870 2010-11-24
  • 打赏
  • 举报
回复

原来是我自己错了
limit的基本用法都不会

谁要是来回复下
我就结帖了

56,679

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧