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
LIMIT后必须是常数,不能是变量。如果需要使用则可以使用 PREPARE 方式。
select * from address limit startid , querycount