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