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
------解决方案-------------------- select * from address limit startid , querycount; LIMIT后必须是常数,不能是变量。