Prerequisite – PL/SQL introduction
In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements.
In declare part, we declare variables and between begin and end part, we perform the operations.
Here, first, we take three variables num, fact, and temp and assign the value in num variable (i.e which number factorial we want).
And then after we assign fact variable to 1.
Input : 4 Output : 24
Input : 6 Output : 720
Below is the required implementation:
factorial of 6 is 720.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Find the factorial of a number in pl/sql
- Program for factorial of a number
- One line function for factorial of a number
- Check if a given number is factorial of any number
- PLSQL | CHR Function
- PLSQL : || Operator
- PLSQL | LOG Function
- PLSQL | LEAST Function
- PLSQL | COS Function
- PLSQL | SIN Function
- PLSQL | ABS Function
- PLSQL | TAN Function
- PLSQL | MOD Function
- PLSQL | EXP Function
- PLSQL | LN Function
- Difference between SQL and PLSQL
- PLSQL | CONVERT Function
- PLSQL | CURRENT_DATE Function
- PLSQL | CURRENT_TIMESTAMP Function
- PLSQL | SINH Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.