Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> 9i, getting the statement that fired the trigger
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;
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 CorpReceived on Wed Jul 18 2001 - 11:16:15 CDT
![]() |
![]() |