Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Creating a Stored Procedure in Oracle
Take a look at the PL/SQL User's guide and reference. Here is a simple
example that calls one of the system procedures.
CREATE OR REPLACE PROCEDURE to_sql_trace
(ora_sid in number, ora_serial in number, ora_boolean in number, ora_sqlcode out number )
IF ora_boolean = 0 THEN
dbms_system.set_sql_trace_in_session(ora_sid, ora_serial,true);
ELSE
dbms_system.set_sql_trace_in_session(ora_sid, ora_serial,false);
END IF;
ora_sqlcode := SQLCODE;
end;
/
--
Terry Dykstra
Canadian Forest Oil Ltd.
Sussette Blasa wrote in message <3727BB4A.22AA2044_at_earthlink.net>...
>Hello! I've been looking through the newsgroups on how to create a
>stored procedure within Oracle. I just started looking into this
>today...:-) Does anyone know how that works? I know it starts off with
>(?):
>
>CREATE PROCEDURE proc_name (some sort of statement) IS
>BEGIN
> some statments
>
>END;
>
>
>Thanks--
>
>--Sussette
>
>
Received on Thu Apr 29 1999 - 13:25:24 CDT