Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle factorial

/*factorial */
DECLARE 
x NUMBER(3); 
n NUMBER(5):=10; 
f NUMBER(10):=1; 
BEGIN 
FOR x IN 1..n
LOOP 
f:= f*x; 
END LOOP; 
DBMS_OUTPUT.PUT_LINE(f) ; 
END;
Source by livesql.oracle.com #
 
PREVIOUS NEXT
Tagged: #oracle #factorial
ADD COMMENT
Topic
Name
9+8 =