Program to Generate Natural Numbers

GENERATE NATURAL NUMBERS ‘n’ USING DO WHILE

SQL> ED natural ‘N’ number sql

DECLARE

                N number := & n

                i number := 1;

      BEGIN

   While [i<=n]

   Loop

   DBMS_output.put_line (i);

 I := i+1

End loop;

End;



OUTPUT:

N=15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Related

Oracle 996546442802071904

Post a Comment

emo-but-icon

item