我創建觸發器檢查廣告表中的付款,並應更新另一個表(customer_account)是否有人知道錯誤在哪裏?觸發器不會工作
CREATE OR REPLACE TRIGGER Payment_check
after UPDATE ON Ads
FOR EACH ROW
BEGIN
IF NEW.Pay_done==('y'||'Y')THEN
UPDATE customer_account SET customer_account.Plcd_ads = NEW.Ad_id
WHERE customer_account.C_id = NEW.Customer;
ELSE
UPDATE customer_account SET customer_account.Pend_ads = NEW.Ad_id
WHERE customer_account.C_id = NEW.Customer;
END IF;
END;
//////bug
Error at line 7: PLS-00103: Encountered the symbol "." when expecting one of the following:
mod
continue current sql execute forall merge
pipe purge
The symbol "" was substituted for "." to continue.
5. IF NEW.Pay_done==('y'||'Y')THEN
6. UPDATE customer_account SET customer_account.Plcd_ads = NEW.Ad_id
7. WHERE customer_account.C_id = NEW.Customer;
8. ELSE
9. UPDATE customer_account SET customer_account.Pend_ads = NEW.Ad_id
爲什麼這個標記爲mysql? –