74

how can i find all the triggers that belong to a table?

4 Answers 4

130

The following will work independent of your database privileges:

select * from all_triggers
where table_name = 'YOUR_TABLE'

The following alternate options may or may not work depending on your assigned database privileges:

select * from DBA_TRIGGERS

or

select * from USER_TRIGGERS
Sign up to request clarification or add additional context in comments.

2 Comments

you may want to add "where table-name = 'FOOBAR'" to that query to narrow your answers down.
Note: table_name should be in uppercase.
6

Another table that is useful is:

SELECT * FROM user_objects WHERE object_type='TRIGGER';

You can also use this to query views, indexes etc etc

3 Comments

That should be object_type = 'TRIGGER' as Oracle is case-sensitive, but ALL_TRIGGERS is better as it also show to which table the trigger belongs (which is not available in ALL_OBJECTS)
Indeed, I have edited. I was just trying to highlight that the user_objects table was handy for other things.
You may want to further narrow down your search, by adding: and object_name like '%foo%';
5

Check out ALL_TRIGGERS:

http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2107.htm#i1592586

Comments

-6

Use the Oracle documentation and search for keyword "trigger" in your browser.

This approach should work with other metadata type questions.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.