TRIGGER WHICH WILL BE FIRED FOR EACH INSERT OR UPDATE ON ENAME OR JOB COLUMNS IN ORACLE?



SQL> CREATE TRIGGER EMP_UPPER
  2 BEFORE INSERT OR UPDATE OF ENAME, JOB ON EMP
      FOR EACH ROW
  3 BEGIN
  4 :NEW.ENAME := UPPER (:NEW.ENAME);
  5 :NEW.JOB := UPPER (:NEW.JOB);
  6 END;
  7 /

Trigger created.

SQL> @ TIRGGER;

SQL> INSERT INTO EMP (EMPNO, ENAME, JOB) VALUES  
         (12,'anshu','lecturar');
 1 row created.

Comments

Popular posts from this blog

Write a program to add two number using inline function in C++?

Traversing of elements program with algorithm and Flowchart