SQL>
SQL> declare
2 function getArea(i_rad NUMBER) return NUMBER
3 is
4 v_pi NUMBER:=3.14;
5 begin
6 return v_pi * (i_rad ** 2);
7 end;
8 function getArea(i_length NUMBER, i_width NUMBER:=3) return NUMBER
9 is
10 begin
11 return i_length * i_width;
12 end;
13 begin
14 DBMS_OUTPUT.put_line('Area (R=3):'||getArea(3));
15 end;
16 /
DBMS_OUTPUT.put_line('Area (R=3):'||getArea(3));
*
ERROR at line 14:
ORA-06550: line 14, column 40:
PLS-00307: too many declarations of 'GETAREA' match this call
ORA-06550: line 14, column 4:
PL/SQL: Statement ignored
SQL>