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.
Floyd’s triangle is a right-angled triangular array of natural numbers. It is defined by filling the rows of the triangle with consecutive numbers, starting with a 1 in the top left corner.
Given a range of number and the task is to form Floyd’s triangle.
Input: 1-29 Output: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Below is the required implementation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- Comparisons between SQL vs PLSQL
- Find the area and perimeter of right triangle in PL/SQL
- SELECT INTO statement in SQL
- Pivot and Unpivot in SQL
- Common error in Group By
- Categories of SQL Functions
- Query to find 2nd largest value in a column in Table
- SQL vs NoSQL: Which one is better to use?
- What are the Best Ways to Write a SQL Query?
- Mathematical functions in MySQL
- MySQL | Ranking Functions
- MySQL | DEFAULT() Function
- MySQL | Recursive CTE (Common Table Expressions)
- MySQL | Group_CONCAT() 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 firstname.lastname@example.org. 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.