Q

Writing procedure or function inside trigger

Is it possible to write a procedure or function inside a database trigger?

Is it possible to write a procedure or function inside a database trigger, and vice versa?
Yes. You can call a procedure or function from a database trigger.

And no. You cannot trigger (fire) a database trigger from a procedure or function. There are three types of triggers:...

1) DML -- fired by a DML statement acted upon a table; 2) Instead-of -- acts on views and is executed instead of the DML statement that fired it; 3) System -- fired when a system event occurs, such as startup or shutdown.

For more information on triggers see chapter 10 in Oracle Database 10g PL/SQL Programmer by Scott Urman, Ron Hardman and Michael McLaughlin.

This was last published in August 2006

Dig Deeper on Using Oracle PL-SQL

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close