Code:SQL> create table xyz (company_name varchar2(20)); Table created. SQL> create or replace trigger xyz_bia 2 before insert or update on xyz 3 for each row 4 begin 5 :new.company_name := upper(:new.company_name); 6* end; SQL> / Trigger created. SQL> commit; SQL> insert into xyz values ('foobar'); 1 row created. SQL> commit; Commit complete. SQL> select * from xyz; COMPANY_NAME -------------------- FOOBAR SQL> insert into xyz values ('foobar2'); 1 row created. SQL> commit; Commit complete. SQL> select * from xyz; COMPANY_NAME -------------------- FOOBAR FOOBAR2 SQL> update xyz set company_name = 'foobar1' where company_name = 'FOOBAR'; 1 row updated. SQL> commit; Commit complete. SQL> select * from xyz; COMPANY_NAME -------------------- FOOBAR1 FOOBAR2 SQL>




Reply With Quote