create PROCEDURE find_address_by_page(in startid INT , in querycount int )
BEGIN
   -- select * from address wehre a_id = startid ;  //如果用这条语句都可以创建过程 成功
   select * from address limit startid , querycount;  -- 这条语句怎么不能成功呢?
end;错误  [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'startid , querycount;  
end' at line 4

解决方案 »

  1.   

    select * from address limit startid , querycount;
    LIMIT后必须是常数,不能是变量。如果需要使用则可以使用 PREPARE 方式。
      

  2.   

    语法错误,limit是用来做限制的!
      

  3.   

    limit  不能用变量,这样不确定。
      

  4.   

    你的startid,querycount是变量而不是常量。
    select * from address limit startid , querycount