CREATE PROCEDURE

Create a stored stand-alone procedure.

Syntax:

   CREATE [OR REPLACE] PROCEDURE [schema.]procedure_name (options)
      invoker_rights AS plsql_sub_program_body

   CREATE [OR REPLACE] PROCEDURE [schema.]procedure_name (options)
      invoker_rights AS LANGUAGE JAVA NAME ('string')

   CREATE [OR REPLACE] PROCEDURE [schema.]procedure_name (options)
      invoker_rights AS LANGUAGE C NAME name LIBRARY lib_name [WITH CONTEXT][PARAMETERS (parameters)]

options: 
      argument IN [NOCOPY] datatype
      argument OUT [NOCOPY] datatype
      argument IN OUT [NOCOPY] datatype
     (The procedure can have several arguments separated with commas)

invoker_rights:
      AUTHID CURRENT_USER
      AUTHID DEFINER

AUTHID DEFINER will execute with the privileges of the procedure schema/owner.

NOCOPY will instruct Oracle to pass the argument as fast as possible. This can significantly enhance performance when passing a large value.

Related Commands:

ALTER PROCEDURE
DROP PROCEDURE
LIBRARY - CREATE LIBRARY

Related Views:

                                                         CODE_PIECES 
                                                         CODE_SIZE 
  DBA_SOURCE           ALL_SOURCE           USER_SOURCE 




Back to the Top

Simon Sheppard
SS64.com