Serge Rielau wrote:
> DA Morgan wrote:
>> 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.
> Tx, I was misinformed then.
You really do need to come out here and take my class. <g>
--
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Wed Aug 22 2007 - 22:42:03 CDT