I wish to create a trigger that would PREVENT any deletion on a given table if the day is either sunday or sat AND the time is between 14:00 and 16:00
Currently time is not a big deal, just how can I make the trigger stop the deletion action?
CREATE OR REPLACE TRIGGER trg_timedelete
BEFORE DELETE
ON test
WHEN (TimeLogicEvaluatesToTrue)
BEGIN
raise_application_error (-20100, 'You can not delete at this time');
END;
The raising of the error will implicitly rollback the transaction and stop the delete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With