Note that OR REPLACE option allows you to overwrite the current procedure with the new code. Note that a procedure ignores the value that you supply for an OUT parameter.Īn INOUT parameter is both readable and writable. Typically, you set a returned value for the OUT parameter and return it to the calling program. It means that if you don’t specify the mode for a parameter explicitly, Oracle will use the IN mode.Īn OUT parameter is writable. You can reference an IN parameter inside a procedure, but you cannot change its value. The parameter mode specifies whether a parameter can be read from or written to.Īn IN parameter is read-only. The following illustrates the basic syntax of creating a procedure in PL/SQL: CREATE PROCEDURE procedure_name (parameter_list)ĮND Code language: SQL (Structured Query Language) ( sql ) PL/SQL procedure headerĪ procedure begins with a header that specifies its name and an optional parameter list.Įach parameter can be in either IN, OUT, or INOUT mode. Technically speaking, a PL/SQL procedure is a named block stored as a schema object in the Oracle Database. PL/SQL procedure syntaxĪ PL/SQL procedure is a reusable unit that encapsulates the specific business logic of the application. Summary: in this tutorial, you will learn how to create, compile, and execute a PL/SQL procedure from the Oracle SQL Developer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |