create or replace function Total_sal
return varchar2
is
Total number;
begin
select sum(salary)into total from employees;
return total;
end;
/
BEGIN
DBMS_OUTPUT.PUT_LINE(TOTAL_SAL);
END;
/
Please correct if my understanding of this ?first we mention a return varchar2 data type and then we pass salary into total (which is number datatype) as salary is number datatype and again return total which is varchar2 which is after the select statement ? do we need to bother about the datatype of the return total statement. ?
.