This is a discussion on Can a stored procedure call itself or recursive stored procedure? How many level SP n within the Database Support forums, part of the Web Development category; Can a stored procedure call itself or recursive stored procedure? How many level SP nesting possible?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Can a stored procedure call itself or recursive stored procedure? How many level SP nesting possible?
__________________ H2O Without us, no one can survive.. |
| Sponsored Links |
| |||
| Hi, In ORACLE Code: CREATE OR REPLACE FUNCTION FUN_Find_Factorial(pmNumber INTEGER) RETURN NUMBER AS
BEGIN
IF(pmNumber= 1) THEN
RETURN 1;
ELSE
-- Calling a Function recursively
RETURN(pmNumber * FUN_Find_Factorial(pmNumber-1));
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('The Error Message:'||SQLERRM);
END FUN_Find_Factorial; Code: Output: 24 4*3*2*1 = 24;
__________________ -Murali.. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stored procedure | itbarota | Database Support | 3 | 03-10-2008 09:43 PM |
| how to get out parameter of stored procedure ? | Murali | PHP Programming | 0 | 12-16-2007 04:57 AM |
| Stored procedure gets executed twice | chris | ASP and ASP.NET Programming | 4 | 11-01-2007 03:08 AM |
| Stored procedure gets executed twice | chris | VB.NET Programming | 0 | 10-30-2007 08:55 AM |
| How to call stored procedure using HTTP SOAP? | oxygen | XML and SOAP | 1 | 07-26-2007 04:28 AM |