0% found this document useful (0 votes)
136 views

ORA-06553: PLS-306: Wrong Number or Types of Arguments in Call To 'FUNC1'

This document discusses a PL/SQL function that takes an employee number as a parameter and uses out parameters to return the employee's first and last name. It then shows how to call the function using bind variables and return the results without passing any parameters by creating a simple function that performs addition and returns the result.

Uploaded by

Salai Sukumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views

ORA-06553: PLS-306: Wrong Number or Types of Arguments in Call To 'FUNC1'

This document discusses a PL/SQL function that takes an employee number as a parameter and uses out parameters to return the employee's first and last name. It then shows how to call the function using bind variables and return the results without passing any parameters by creating a simple function that performs addition and returns the result.

Uploaded by

Salai Sukumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

FUNCTION

create or replace function func1(eno number,fn out


varchar2,ln out varchar2)
return number
is
begin
select first_name,last_name into fn ,ln from
employees where employee_id=eno;
return fn;
end;
/
Function created
1)
Select func1(100) from dual
ORA-06553: PLS-306: wrong number or types of arguments in call to
'FUNC1'
2) Bind Variables
Whenever we use out parameter in function & procedures,we go to
Session variables(or)host variables.
Variable a varchar2(20);
Variable b varchar2(20);
Variable c varchar2(20);
Begin
:a:=func1(101,:b,:c);
End;
/
PL/SQL procedure successfully completed
Print a;
Print b;
Function return values, If I dont want to pass any parameter
create or replace function func1

return number
is
a number(5):=100;
b number(5):=200;
c number(5);
begin
c:=a+b;
return c;
end;
/
select func1 from dual

You might also like