CREATE OR REPLACE TRIGGER trg
--before insert ON t
before update of sal on t
--after insert on t
FOR EACH ROW
BEGIN
DBMS_OUTPUT.PUT_LINE('A new record is being inserted into the employee table:');
DBMS_OUTPUT.PUT_LINE('Employee ID: ' || :New.empno);
DBMS_OUTPUT.PUT_LINE('Employee Name: ' || :New.ename);
--DBMS_OUTPUT.PUT_LINE('Hire Date: ' || TO_CHAR(:NEW.hiredate, 'YYYY-MM-DD'));
END;
/
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter