CREATE PROCEDURE GenerateWaterNum(in pre varchar(100))
begin
select * from testtable;
END;下面是返回:
#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 '' at line 3
begin
select * from testtable;
END;下面是返回:
#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 '' at line 3
begin
select * from testtable;
END;复制代码试试看 ,CREATE 和 PROCEDURE 之间 离的太近了 。
把;给转义了就可以了。
CREATE PROCEDURE GenerateWaterNum(in pre varchar(100))
begin
select * from testtable;
END//
delimiter ;