filmov
tv
PLSQL LOOPS with Examples | Basic Loop, While Loop, For Loop in Pl/SQL | PL-SQL Course Tutorial 2023

Показать описание
In this video, I have discussed basic loop, while loop, and for loop in pl/sql
"PL SQL LOOPS with Examples | Basic Loop, While Loop, For Loop in Pl/SQL | PL-SQL Full Course Tutorial 2023
#plsql #plsqlloop #plsqlforloop #plsqlwhileloop,plsqlenglish #loop #basicloop #whileloop #forloop #plsqltutorial #plsqltutorialinenglish #PLSQL #plsqlforbeginners #plsqlbasics #plsqlprocedures #plsqlcursor #plsqlfunctions #plsqltriggers #plsqlvssql #oracleplsql #PLSQLtutorialforbeginners #PLSQLtutorialinenglish #plsqlinterview #plsqlinenglish #parnikatutorials #plsql2023 #plsqlfullcourse2023 #plsqlfullcrashcourse2023 #plsqlcrashcourse #plsqlcourse2023
00:58 - basic loop intro
02:25 - basic loop syntax
08:03 - while loop syntax
13:21 - for loop syntax"
The PL/SQL loops are used to repeat the execution of one or more statements for specified number of times. These are also known as iterative control statements.
There are 3 types of PL/SQL Loops.
Basic Loop / Exit Loop
While Loop
For Loop
Basic Loop
PL/SQL basic loop is used when a set of statements is to be executed at least once before the termination of the loop. There must be an EXIT condition specified in the loop, otherwise the loop will get into an infinite number of iterations. After the occurrence of EXIT condition, the process exits the loop.
LOOP
Sequence of statements;
END LOOP;
Note: You must follow these steps while using PL/SQL basic Loop.
Initialize a variable before the loop body
Increment the variable in the loop.
You should use EXIT WHEN statement to exit from the Loop. Otherwise the EXIT statement without WHEN condition, the statements in the Loop is executed only once.
While Loop
PL/SQL while loop is used when a set of statements has to be executed as long as a condition is true, the While loop is used. The condition is decided at the beginning of each iteration and continues until the condition becomes false.
WHILE (condition)
LOOP statements;
END LOOP;
Note: You must follow these steps while using PL/SQL WHILE Loop.
Initialize a variable before the loop body.
Increment the variable in the loop.
You can use EXIT WHEN statements and EXIT statements in While loop but it is not done often.
FOR Loop
PL/SQL for loop is used when when you want to execute a set of statements for a predetermined number of times. The loop is iterated between the start and end integer values. The counter is always incremented by 1 and once the counter reaches the value of end integer, the loop ends.
Syntax of for loop:
FOR counter IN initial_value .. final_value LOOP
LOOP statements;
END LOOP;
initial_value : Start integer value
final_value : End integer value
You don't need to declare the counter variable explicitly because it is declared implicitly in the declaration section.
The counter variable is incremented by 1 and does not need to be incremented explicitly.
You can use EXIT WHEN statements and EXIT statements in FOR Loops but it is not done often.
Social media Links:
To get the regular updates:
Playlists:
Virtual Coffee with Jagadeesh:
Digital Logic Design:
Computer Organization and Architecture:
C Programming:
Data Structures:
Theory of Computation:
Compiler Design:
Computer Networks:
For GATE PYQs and much more explore:
"PL SQL LOOPS with Examples | Basic Loop, While Loop, For Loop in Pl/SQL | PL-SQL Full Course Tutorial 2023
#plsql #plsqlloop #plsqlforloop #plsqlwhileloop,plsqlenglish #loop #basicloop #whileloop #forloop #plsqltutorial #plsqltutorialinenglish #PLSQL #plsqlforbeginners #plsqlbasics #plsqlprocedures #plsqlcursor #plsqlfunctions #plsqltriggers #plsqlvssql #oracleplsql #PLSQLtutorialforbeginners #PLSQLtutorialinenglish #plsqlinterview #plsqlinenglish #parnikatutorials #plsql2023 #plsqlfullcourse2023 #plsqlfullcrashcourse2023 #plsqlcrashcourse #plsqlcourse2023
00:58 - basic loop intro
02:25 - basic loop syntax
08:03 - while loop syntax
13:21 - for loop syntax"
The PL/SQL loops are used to repeat the execution of one or more statements for specified number of times. These are also known as iterative control statements.
There are 3 types of PL/SQL Loops.
Basic Loop / Exit Loop
While Loop
For Loop
Basic Loop
PL/SQL basic loop is used when a set of statements is to be executed at least once before the termination of the loop. There must be an EXIT condition specified in the loop, otherwise the loop will get into an infinite number of iterations. After the occurrence of EXIT condition, the process exits the loop.
LOOP
Sequence of statements;
END LOOP;
Note: You must follow these steps while using PL/SQL basic Loop.
Initialize a variable before the loop body
Increment the variable in the loop.
You should use EXIT WHEN statement to exit from the Loop. Otherwise the EXIT statement without WHEN condition, the statements in the Loop is executed only once.
While Loop
PL/SQL while loop is used when a set of statements has to be executed as long as a condition is true, the While loop is used. The condition is decided at the beginning of each iteration and continues until the condition becomes false.
WHILE (condition)
LOOP statements;
END LOOP;
Note: You must follow these steps while using PL/SQL WHILE Loop.
Initialize a variable before the loop body.
Increment the variable in the loop.
You can use EXIT WHEN statements and EXIT statements in While loop but it is not done often.
FOR Loop
PL/SQL for loop is used when when you want to execute a set of statements for a predetermined number of times. The loop is iterated between the start and end integer values. The counter is always incremented by 1 and once the counter reaches the value of end integer, the loop ends.
Syntax of for loop:
FOR counter IN initial_value .. final_value LOOP
LOOP statements;
END LOOP;
initial_value : Start integer value
final_value : End integer value
You don't need to declare the counter variable explicitly because it is declared implicitly in the declaration section.
The counter variable is incremented by 1 and does not need to be incremented explicitly.
You can use EXIT WHEN statements and EXIT statements in FOR Loops but it is not done often.
Social media Links:
To get the regular updates:
Playlists:
Virtual Coffee with Jagadeesh:
Digital Logic Design:
Computer Organization and Architecture:
C Programming:
Data Structures:
Theory of Computation:
Compiler Design:
Computer Networks:
For GATE PYQs and much more explore: