Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Consider a scenario, where there are two tables "A" and "B".

Table "A" has a trigger "Ta" [written long before me joining this project and thus I'm completely unaware of the trigger], which updates a column named "colB" in table "B".

Now, since I'm mostly using table "B" and concerned about the way "colB" is getting, I won't know if trigger "Ta" is updating this column.

So my question is, is there a direct oracle query/way to find if a column in one table is getting updated by any trigger running on another table?

Thanks in advance for educating me on this.

Regards a.b

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.1k views
Welcome To Ask or Share your Answers For Others

1 Answer

SELECT *
FROM 
    user_sources
WHERE
    type = 'TRIGGER'
AND UPPER(text) LIKE '%UPDATE A%';

But it won't work if the query is in two lines such as :

UPDATE
    A
SET
   ...

because text matches to a given line in the corresponding object.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...