0
我想在修改用户表时更新计数器表。在mysql触发器内调用程序
我已经创建了一个触发器,我将调用此过程。 但是这个过程并不是创造的。 请告诉我在这个程序中有什么错误。
CREATE PROCEDURE barproc(IN id int,IN val int)
BEGIN
DECLARE @total_products int;
set @total_products=(SELECT COUNT(*)
FROM user where a=id and status='active')
if(@total_products>0)
update counter
set b=val
WHERE a = id and status='active';
END if;
谢谢!它的工作很好... –
@PushpendraSingh不客气:) – peterm