Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to: Stored Procedure / Package

Re: How to: Stored Procedure / Package

From: Joel R. Kallman <jkallman_at_us.oracle.com>
Date: 1997/06/21
Message-ID: <33ad4046.5612890@newshost.us.oracle.com>#1/1

On 20 Jun 1997 03:02:18 GMT, "Larry Schenavar" <lorenzo_at_gate.net> wrote:

>Hello,
>
>At this time I have a series of four update queries that I kick off from
>the command scheduler in NT. I'd like to put them in a stored procedure or
>package. What syntax do I use to create the procedure package?
>
>Something like this????????
>
>Create or replace procedure EP_PRO
>
> UPDATE INTO ...
> WHERE ...;
>
> UPDATE INTO ...
> WHERE ...;
>
> UPDATE INTO ...
> WHERE ...;
>
>End EP_PRO;
>
>

As an example, the following statement, taken from the Oracle7 SQL Reference Manual, creates the procedure CREDIT in the schema SAM:

CREATE PROCEDURE sam.credit (acc_no IN NUMBER, amount IN NUMBER) AS BEGIN
UPDATE accounts
SET balance = balance + amount
WHERE account_id = acc_no;
END; Thanks!

Joel

Joel R. Kallman          Enabling the Information Age through
Oracle Government                Network Computing!
Bethesda, MD                  http://govt.us.oracle.com
jkallman@us.oracle.com          http://www.oracle.com



The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation. Received on Sat Jun 21 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US