Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> 9i, getting the statement that fired the trigger

9i, getting the statement that fired the trigger

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 18 Jul 2001 09:16:15 -0700
Message-ID: <9j4cof02i24@drn.newsguy.com>

another one that missed the press releases

tkyte_at_TKYTE901.US.ORACLE.COM> create table t ( x int ); Table created.

tkyte_at_TKYTE901.US.ORACLE.COM> create or replace trigger t_trigger   2 before insert on t
  3 declare
  4 l_text ora_name_list_t;
  5 begin

  6      dbms_output.put_line( 'The statement that caused me to fire is:' );
  7      for i in 1 .. ora_sql_txt( l_text )
  8      loop
  9          dbms_output.put_line( l_text(i) );
 10      end loop;

 11 end;
 12 /

Trigger created.

tkyte_at_TKYTE901.US.ORACLE.COM> set serveroutput on tkyte_at_TKYTE901.US.ORACLE.COM> variable n number

tkyte_at_TKYTE901.US.ORACLE.COM> insert /* check this out */ into t values ( :n ); The statement that caused me to fire is: insert /* check this out */ into t values ( :n )

1 row created.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Wed Jul 18 2001 - 11:16:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US