In this part, you can declare variables, constants, cursors, etc. The executable part must contain at least one executable statement. The executable part is mandatory whereas the declarative and exception-handling parts are optional. Similar to an anonymous block, the procedure body has three parts. 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 write to.Īn IN parameter is read-only. IS Code language: SQL (Structured Query Language) ( sql )ĮND 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. CREATE PROCEDURE procedure_name (parameter_list)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |