Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle: SQL query to find all the triggers belonging to the tables?

Tags:

sql

oracle

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

like image 397
Rajesh Kumar G Avatar asked Feb 04 '11 09:02

Rajesh Kumar G


People also ask

How can I see all triggers in SQL?

To view database level triggers, Login to the server using SQL Server management studio and navigate to the database. Expand the database and navigate to Programmability -> Database Triggers. To view triggers at the server level, Login to Server using SSMS and navigate to Server Objects and then Triggers folder.

How do you check if there is a trigger on a table in Oracle?

Input : SELECT TRIGGER_NAME FROM USER_TRIGGERS; Output : Input : SELECT * FROM USER_TRIGGERS; Output : NOTE: Using * means that we need all the attributes for that database object or Trigger to get displayed.


1 Answers

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 
like image 152
yanjost Avatar answered Sep 19 '22 03:09

yanjost