Can we pass parameters in triggers like in procedures?

Can we pass parameters in triggers like in procedures and Triggers?

Comments for Can we pass parameters in triggers like in procedures?

Average Rating starstarstarstarstar

Click here to add your own comments

Nov 07, 2016
Rating
starstarstarstarstar
Triggers don't take parameters
by: John

Unfortunately not. Oracle PL?SQL triggers fire implicitly in response to external events (such as the execution of a SQL statement, or a log on/off or database shutdown) and you do not (and cannot) call them explicitly. So, there's no way to pass parameters to them as you would to a Stored Procedure. However you can call a PL/SQL procedure or function from a trigger and you can also query the database so there are ways by which you can have conditional code execution,

See the Oracle PL/SQL Lanaguage Refererence manual for more details on triggers and our series of PL/SQL tutorials starting here.

Click here to add your own comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Oracle Questions.