PLSQL Program Sum of number between 1 to 100 using SQL - Interview Questions & Answers
https://sqlqueries.in/community/interview-questions-answers/sum-of-number-between-1-to-100/
SQL Queries Discussion Boarden-GBThu, 19 May 2022 16:02:04 +0000wpForo60PLSQL Program Sum of number between 1 to 100 using SQL
https://sqlqueries.in/community/interview-questions-answers/sum-of-number-between-1-to-100/#post-1349
Sat, 16 Apr 2022 10:38:21 +0000How to get sum of number between 1 to 100

Here you go..

Declare
a number;
sum_of number :=0;
Begin
a:=1;
loop
sum_of:=sum_of+a;
exit when (a=100);
a:=a+1;
end loop;
dbms_output.put_line('Sum between 1 to 100 is '||sum_of);
End;