Procedures
Procedures
PL/SQL Functions:
* PL/SQL Functions are also called Stored functions
* Used to perform an operation when we call it.
* Functions are callable objects
* Function can return a value whereas procedures can't return a value.
* to create function we have to use "create or replace Function " statement
syntax:
create or replace Function functionname(arg1 type, ....)
return type
is / as
begin
statements ;
return value;
end;
A procedure must have arguments (variables to store data)
ex:
create or replace function fun1(n number)
return number
as
begin
return n+20;
end;