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