How to use a function in Oracle PL/SQL?
What is a Function in Oracle PL/SQL Function : The PL/SQL Function is very identical to PL/SQL Procedure.The big dissension between procedure and a function, a function essential always return a value, but procedure may or may not return a value. Functions is also used to solve a particular task like procedure. Function always returns a value.Oracle provided us a facility to create our own functions to solve any task. How To Create a function Syntax: Create or replace function p1 (formal parameters) return datatype is variable,cursor, user_defined exception begin ...... return expression; // Do not use dbms_output.put_line() exception ....... end; _________________________________________________________________________________ Execution: Method 1: Select function_name from dual; Method 2: By anonymous block Syntex: declare ...