1.

What all packages are available for PL SQL developers?

Answer»

Recursion works the same way as we saw in programming languages like C, C++, JAVA, C#, etc.

A program or subprogram calling itself is called a recursive call and the process is recursion.

Let us see an example wherein we are displaying the usage of Recursive call:

DECLARE   N number;   factorial number;   FUNCTION fact(a number) RETURN number   IS   f number; BEGIN   IF a=0 THEN      f := 1;   ELSE      f := a * fact(a-1);   END IF; RETURN f; END;   BEGIN   n:= 3;   factorial := fact(n);   dbms_output.put_line('Value of Factorial '|| n || ' is ' || factorial); END; /

The output:

Value of Factorial 3 is 6


Discussion

No Comment Found