ERROR 1064 (42000):您的 SQL 语法有错误;检查手册
对应于您的 MySQL 服务器版本,以便在 '= (se
从 tbl_Manufacturer 选择 ifnull(max(manufactureId+1),1)
) ;
create procedure ManufactureAdd(
p_manufactureName longtext,
p_address longtext,
p_phone varchar(50),
p_email varchar(50),
p_description longtext
)
begin
declare p_manufactureId = (select ifnull(max(manufactureId+1),1) from tbl_Manufacturer
) ;
insert into tbl_Manufacturer(
manufactureId,
manufactureName,
address,
phone,
email,
description
)
VALUES
(
p_manufactureId,
p_manufactureName,
p_address,
p_phone,
p_email,
p_description
) ;
SELECT p_manufactureId ;
end