Questions And Answers

More Tutorials

Oracle PL SQL procedure


[(parameter_name [IN | OUT | IN OUT] TYPE [, ...])]
{IS | AS}
 < declarations >
 < procedure_body >
EXCEPTION -- Exception-handling part begins
 <EXCEPTION handling goes here >
 WHEN exception1 THEN
END procedure_name;

.procedure-name specifies the name of the procedure.

.[OR REPLACE] option allows modifying an existing procedure.

.The optional parameter list contains name, mode and types of the parameters. IN represents that value will be passed from outside and OUT represents that this parameter will be used to return a value outside of the procedure. If no mode is specified, parameter is assumed to be of IN mode.

.In the declaration section we can declare variables which will be used in the body part.

.procedure-body contains the executable part.

.The AS keyword is used instead of the IS keyword for creating a standalone procedure.

.exception section will handle the exceptions from the procedure. This section is optional.


In this page (written and validated by ) you learned about Oracle PL SQL procedure . What's Next? If you are interested in completing Oracle tutorial, your next topic will be learning about: Oracle Hello World.

Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue:

Share On:

Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using, you agree to have read and accepted our terms of use, cookies and privacy policy.