Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle NULL vs '' revisited
Serge Rielau wrote:
> Will the trigger fire if no row is updated?
>
> Cheers
> Serge
Yes!
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
With the Partitioning, OLAP and Data Mining options
SQL> CREATE TABLE t (
2 testcol VARCHAR2(5));
Table created.
SQL> INSERT INTO t VALUES ('AAA');
1 row created.
SQL> CREATE OR REPLACE TRIGGER testtrig
2 BEFORE UPDATE
3 ON t
4
5 DECLARE
6 vMsg VARCHAR2(30) := 'Trigger Fired';
7 BEGIN
8 dbms_output.put_line(vMsg);
9 END testtrig;
10 /
Trigger created.
SQL> set serveroutput on
SQL> UPDATE t
2 SET testcol = 'BBB'
3 WHERE testcol = 'CCC';
Trigger Fired <================ note that the trigger fired
0 rows updated.
SQL>
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Wed Aug 22 2007 - 11:04:12 CDT
![]() |
![]() |