PL/SQL Control Statement Exercises: Show the value of a same variable declared as local and global
PL/SQL Control Statement: Exercise-25 with Solution
Write a program in PL/SQL to show the value of a same variable declared as local and global.
Sample Solution:
PL/SQL Code:
Flowchart:

Sample Output:
When local the value: 1, but the value as global: 6 When local the value: 2, but the value as global: 6 When local the value: 3, but the value as global: 6 When local the value: 4, but the value as global: 6 PL/SQL procedure successfully completed.
Improve this sample solution and post your code through Disqus
Previous: Write a program in PL/SQL to print 1st n numbers with a difference of 3 and starting from 1.
Next: Write a program in PL/SQL to explain the uses of nested for loop with label.
What is the difficulty level of this exercise?