fairly new to triggers so just trying to get my head round on how to create certain triggers.
i have to make a doctors practise with patients and the trigger has to count if a patient has made 4 or more appointments their details will be stored into a audit
table
i go all the tables up and running i am just stuck on how to create this trigger, im wondering if it is possible to create a trigger that counts the amount of times a pat_no has been into the appointment table
This is what i have so far, its not much so any help would be must appreciated
CREATE OR REPLACE TRIGGER TRG_AUDIT
AFTER INSERT ON APPOINTMENT
FOR EACH ROW
BEGIN
END
im guessing its a when clause to count the amount of the same pat_no is entered onto the appointment table