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

解决方案 »

  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). 
      

  2.   

    第5条:
    SELECT * FROM table LIMIT 4,1
    后边的所有数据呢
    SELECT * FROM table LIMIT 4,100000
      

  3.   

    select count(*) into @cnt from table;
    select * from table where 1 limit 4,@cnt;如果第二条是在MYSQL上,那么就应该用动态处理语句。
      

  4.   

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

  5.   

    后面放极大的数会不会有效率问题呀?
    MySQL里边没有从某条记录到记录尾的查询吗?
    楼上各家都提到了这个很大的数,这个是多少才算大呢,
    不会带来查询的效率问题吗?
      

  6.   

    参考MYSQL手册中的说明 , 18446744073709551615; 这个数足够大了。