Call procedure inside trigger in mysql -
i want update counter table when user table modofied.
i have created trigger cal procedure. procudeure not creating. please tell me error in procedure.
create procedure barproc(in id int,in val int) begin declare @total_products int; set @total_products=(select count(*) user a=id , status='active') if(@total_products>0) update counter set b=val = id , status='active'; end if;
try
delimiter $$ create procedure barproc(in id int, in val int) begin if (select count(*) `user` = id , `status` = 'active') update counter set b = val = id , `status` = 'active'; end if; end$$ delimiter ;
Comments
Post a Comment