Home » SQL & PL/SQL » SQL & PL/SQL » How to create a procedure in a package body
How to create a procedure in a package body [message #224942] Fri, 16 March 2007 01:45 Go to next message
donind
Messages: 95
Registered: February 2007
Member
Hi,

How to create a procedure in a package body?
Can we write trigger inside a package by declaring it in specification and writing trigger in package body with syntax.

Thanks
Re: How to create a procedure in a package body [message #224944 is a reply to message #224942] Fri, 16 March 2007 01:53 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
hi,


you cannot create trigger in a package.and for creating a procedure in a package body its something like this

create or replace package body test_pkg is
procedure test_proc is
begin
proc_body....
end test_proc;
end test_pkg;



regards,
Re: How to create a procedure in a package body [message #224963 is a reply to message #224942] Fri, 16 March 2007 02:55 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
donind wrote on Fri, 16 March 2007 07:45
Can we write trigger inside a package by declaring it in specification and writing trigger in package body with syntax.
You can write the trigger logic in a packaged procedure and call the procedure from your trigger. I like this approach, since you can keep your trigger code nice and clean.

MHE
Previous Topic: Updating a primaty key and reflecting the changes to foreign keys.
Next Topic: Query issue
Goto Forum:
  


Current Time: Fri Dec 02 16:49:33 CST 2016

Total time taken to generate the page: 0.38871 seconds