Summary: in this tutorial, you will learn how to develop a PL/SQL function and how to call it in various places such as an assignment statement, a Boolean expression, and an SQL statement. Creating a PL/SQL function. Similar to a procedure, a PL/SQL function is a reusable program unit stored as a schema object in the Oracle Database. Calculate Factorial of a number Suppose 4!=4.3.2.1.
Factorial Program In Pl Sql Syntax
Here you will get pl/sql program to find factorial of a number.
We can calculate factorial of a number by multiplying it with all the numbers below it.
For example factorial of 5 = 5 x 4 x 3 x 2 x 1 = 120.
PL/SQL Program to Find Factorial of a Number
![Factorial Program In Pl Sql Factorial Program In Pl Sql](https://1.bp.blogspot.com/-0P9BwtLulpM/XgdXIcaCLxI/AAAAAAAACKg/gNyhPTf3IC0rA3KZIlUxcz_dK0caetEHgCNcBGAsYHQ/s400/oracle-pl-sql.png)
2 4 6 8 10 12 14 16 | nnumber; inumber; begin loop endloop; dbms_output.put_line('factorial='||fac); / |
![Program Program](https://www.tutorialspoint.com/plsql/images/oracle_install_error1.jpg)
![Factorial Program In Pl Sql Factorial Program In Pl Sql](https://i.ytimg.com/vi/OgEmJtOQ7hg/hqdefault.jpg)
Transact-SQL also gives you this option to repeat the expression using CTE (Common Table Expression). A factorial is denoted by n! The factorial of a number is defined as n! Our Expert team is ready to answer all your questions immediately-Feel free to speak in Tamil/English. (Example:Events info/Lecture Notes/Off-Campus & All Jobs/Projects & All education information).
Output
![Factorial program in pl sql relational Factorial program in pl sql relational](https://i.ytimg.com/vi/KmWUOsPYmUE/maxresdefault.jpg)
Factorial Program In Pl Sql Query
Enter value for n: 10
old 7: n:=&n;
new 7: n:=10;
factorial=3628800
Factorial Program In Pl Sql W3schools
You May Also Like:
![](https://cdn-ak.f.st-hatena.com/images/fotolife/r/ruriatunifoefec/20200910/20200910011350.png)