Home » SQL & PL/SQL » SQL & PL/SQL » Procedures
Procedures [message #9828] Sun, 07 December 2003 02:30 Go to next message
kris
Messages: 43
Registered: February 2002
Member
Hi Guys,
I want to know if it is possible to write a database trigger within a stored procedure or package.

Thanks In Advance
Re: Procedures [message #9830 is a reply to message #9828] Sun, 07 December 2003 06:12 Go to previous message
Barbara Boehmer
Messages: 9090
Registered: November 2002
Location: California, USA
Senior Member
No, it is not possible to write a database trigger within a stored procedure or package. Triggers must be compiled separately. If you think about it, it makes sense, because they are executed differently. A trigger is fired when a specified event occurs, but a procedure, or package within a procecdure, is executed when it is called or scheduled. If you write a database trigger to fire when an event occurs and you write a procedure that causes that event to occur, then the execution of the procedure will cause that trigger to fire.
Previous Topic: Question about varchar datatype
Next Topic: Constarints on a Table
Goto Forum:
  


Current Time: Fri Apr 26 09:05:52 CDT 2024