Problem solve Get help with specific problems with your technologies, process and projects.

Passing parameters to a trigger

Is it possible to pass parameters to a trigger which in turn can be used to call a stored procedure?
Not really. The CREATE TRIGGER statement does not allow for input and/or output parameters like stored procedures do. But within a trigger, you can pass information to a stored procedure or function. After all, the body of a trigger is just a PL/SQL block. What you can do is query for data from other tables or views. The results of your queries inside the trigger can be parameters to a procedure or function.

For More Information

  • What do you think about this answer? E-mail the Edtior at [email protected] with your feedback.
  • The Best Oracle Web Links: tips, tutorials, scripts, and more.
  • Have an Oracle or SQL tip to offer your fellow DBA's and developers? The best tips submitted will receive a cool prize--submit your tip today!
  • Ask your technical Oracle and SQL questions--or help out your peers by answering them--in our live discussion forums.
  • Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.

Dig Deeper on Oracle database design and architecture