The
CREATE PROCEDURE statement defines a procedure at the current server.
Three different types of procedures can be created using
this statement. Each of these types is described separately.
- External. The procedure body is written in a programming language.
The external executable is referenced by a procedure defined at the
current server, along with various attributes of the procedure.
- Sourced. The procedure body is part of the source procedure, which
is referenced by the sourced procedure that is defined at the current
server, along with various attributes of the procedure. A sourced
procedure whose source procedure is at a data source is also called
a federated procedure.
- SQL. The procedure body is written in SQL and defined at the current
server, along with various attributes of the procedure.
The
CREATE PROCEDURE statement can be submitted in obfuscated form. In
an obfuscated statement, only the procedure name and its parameters
are readable. The rest of the statement is encoded in such a way that
is not readable but can be decoded by the database server. Obfuscated
statements can be produced by calling the DBMS_DDL.WRAP function.