SQL>
SQL> CREATE TABLE golf_scores
2 (timestamp DATE NOT NULL,
3 score NUMBER NOT NULL,
4 commentary VARCHAR2(30));
Table created.
SQL>
SQL> CREATE OR REPLACE TRIGGER golf_commentary_under_par
2 BEFORE INSERT ON golf_scores
3 FOR EACH ROW
4 WHEN (NEW.score < 72)
5 BEGIN
6 :NEW.commentary := 'Under Par';
7 END;
8 /
Trigger created.
SQL>
SQL> DROP TABLE golf_scores;
Table dropped.
SQL>