I am having an issue creating this function with a trigger using postgreSQL (plpgsql). Could someone please help me solve this?
I am having an issue creating this function with a trigger using postgreSQL (plpgsql). Could someone please help me solve this? Thank you!
CREATE OR REPLACE FUNCTION Moreno_03_bankTriggerFunction()
RETURNS TRIGGER
LANGUAGE PLPGSQL
AS
$$
BEGIN
CREATE TRIGGER Moreno_03_bankTrigger
AFTER DELETE ON account
FOR EACH ROW
WHERE depositor.account_number = account.account_number
EXECUTE PROCEDURE Moreno_15_bankTriggerFunction();
END;
$$
branch ( branch_name, branch_city, assets )
customer ( ID, customer_name, customer_street, customer_city )
loan ( loan_number, branch_name, amount )
borrower ( ID, loan_number )
account ( account_number, branch_name, balance )
depositor ( ID, account_number )
Trending now
This is a popular solution!
Step by step
Solved in 2 steps