A function is executed like any other SQL built-in function: : Function Definition « Stored Procedure Function « Oracle PL / SQL






A function is executed like any other SQL built-in function:

   
SQL>
SQL> create or replace function calculate_area
  2    (v_length in number, v_width in number)
  3      return number
  4      is
  5         v_area number;
  6      begin
  7         v_area := v_length * v_width;
  8         return v_area;
  9     end;
 10   /

Function created.

SQL>
SQL>

   
    
    
  








Related examples in the same category

1.Define and call a function
2.Define and use function in select clause
3.A stored function.
4.Use user-defined function in if statement
5.Recursive function
6.function with no return type
7.Recursive function Factorial
8.A local function
9.Recursive function 2
10.demonstrates the behavior of the DETERMINISTIC keyword.
11.Function to convert celsius to fahrenheit
12.Function to convert fahrenheit to celsius
13.Count Employee from a function and return value back
14.How stored functions can be called from SQL
15.Raise exception from inner function