Re: Help in Database Triggers...
From: Thomas B. Cox <tcox_at_netcom.com>
Date: 1995/09/11
Message-ID: <tcoxDEr5ME.Lz3_at_netcom.com>#1/1
Date: 1995/09/11
Message-ID: <tcoxDEr5ME.Lz3_at_netcom.com>#1/1
In article <42oa6n$3qf_at_news.eecs.uic.edu>,
Rajasekhar Gunturu <rgunturu_at_bert.eecs.uic.edu> wrote:
> Is it ok to have a procedure declared inside a database trigger?
[example deleted]
No, it is not OK, for a couple of reasons.
First, triggers are not stored in compiled form, but procedures and packages are -- so trigger logic in excess of about 20 lines of code should go into a stored proc, and write a trigger that fires it.
Remember that your stored proc (or package) can take parameters, and can return parameters to the trigger.
Also, it's a syntax error to try to declare a database object inside another database object (except that procs and funcs can exist inside a package).
Interesting idea, though.
-Tom
-- Thomas B. Cox tcox_at_netcom.com Author of _Oracle Workgroup Server Handbook_, ISBN 0-07-881186-4 ...be seeing you at IOUW '95!Received on Mon Sep 11 1995 - 00:00:00 CEST