create procedure BookID_Generate(in_ISBN char(18),count int,firstID char(10))
begin
while count > 0 do
insert into tblend values(firstID,in_ISBN,'否');
set firstID=firstID+1;
set count=count-1;
end while;
end;
这里in_ISBN, count,firstID三个都是要输入的变量,前面加in同样也报错
ERROR 1064 (42000): 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 4
mysql> set firstID=firstID+1;
ERROR 1193 (HY000): Unknown system variable 'firstID'
mysql> set count=count-1;
ERROR 1193 (HY000): Unknown system variable 'count'
mysql> end while;
ERROR 1064 (42000): 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 'end while' at line 1
mysql> end;