View previous topic :: View next topic
|
Author |
Message |
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
I want to see the existing triggers setup on few of tables.
I have run below sample SQL in SPUFI query but i found 0 ROWS DISPLAYED message.
Code: |
select NAME from SYSIBM.SYSTRIGGERS where TBNAME = 'EMPLOYEE'; |
assume EMPLOYEE is my table name...
Is there any other means to check TRIGGERS on desired tables ? |
|
Back to top |
|
|
sharad_shanu
New User
Joined: 03 Oct 2006 Posts: 40
|
|
|
|
well.....which table you are referring to...The one which triggers the event or the one which is impacted?
Lets assume I have a table TAB1. There is a trigger TGR0 which says that whenever a new record is added in the table TAB1 there should also be an insert into another table TAB2.
Now which table you are giving in your query TAB1 or TAB2???
Please note that TBNAME column in your query will have the causing table (TAB1). In case you want to find out whether are there any tables which are getting impacted then you should look at column name STATEMENT. Your query should look like:
Code: |
SELECT NAME FROM SYSIBM.SYSTRIGGERS WHERE STATEMENT LIKE ('%tab2%');
|
In the SYSIBM.SYSTRIGGERS table:
tbname = TAB1
name = TRG0
statement = Entire trigger SQL statement which has impacted table names ie TAB2 |
|
Back to top |
|
|
|