PL/SQL Function

Advertisements

PLSQL Procedure PLSQL Exception Handling

PL/SQL Function

A PL/SQL Function is a self control block which is used to perform some specific task.

Difference between function and procedure

The main difference between a procedure and a function is, a function must always return a value, but a procedure may or may not return a value.

Syntax

CREATE OR REPLACE FUNCTION function_name(parameters)
RETURN return_datatype;  
IS  
Declaration_section  
BEGIN  
Execution_section 
Return return_variable;  
EXCEPTION  
exception section  
Return return_variable;  
END; 

Example of function to add two number

Example

create or replace function add(a number, b number)
return number
is
number;
begin;
a:=10;
b:=20;
c=a+b;
return c;
end;

PLSQL Procedure PLSQL Exception Handling

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Download Projects

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements