我正在尝试将存储过程添加到 Mysql 中,但总是在第 6 行显示错误 请帮助我解决此问题。
create procedure User_Sync_Proc(in ID int,in Matricule int,in Type_OP nvarchar(50))
begin
if (select current_user()='root@localhost')
then
insert into user_sync values(ID,Matricule,Type_OP,Now());
end if;
end
您可能只需要设置分隔符
drop procedure if exists User_Sync_Proc;
delimiter $$
create procedure User_Sync_Proc(in ID int,in Matricule int,in Type_OP nvarchar(50))
begin
if (select current_user()='root@localhost')
then
insert into user_sync values(ID,Matricule,Type_OP,Now());
end if;
end $$
delimiter ;
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句