读书人

MySql 查询某条数据到最后数据集合报

发布时间: 2012-03-14 12:01:12 作者: rapoo

MySql 查询某条数据到最后数据集合,报错
如题:

SELECT * FROM table LIMIT 5,-1;
在百度找了些,说是这么写,但是报错呀,望高人指点
受累,试过了再说,谢谢

[解决办法]
SELECT * FROM table LIMIT 5,1

只能使用非负的整数
The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants (except when using prepared statements).
[解决办法]

探讨

那怎么获取第5条和后边的所有数据呢?
谢谢

[解决办法]
直接 select * from table limt 4,999999999
后面放一个极大的数字就可以了。

读书人网 >Mysql

热点推荐