SQL> CREATE OR REPLACE FUNCTION circle_area (p_radius IN NUMBER) RETURN NUMBER AS
2 v_pi NUMBER := 3.1415926;
3 v_area NUMBER;
4 BEGIN
5 v_area := v_pi * POWER(p_radius, 2);
6 RETURN v_area;
7 END circle_area;
8 /
Function created.
SQL>
SQL>