Q:

Write a program in PL/SQL to print 1st n numbers

0

Write a program in PL/SQL to print 1st n numbers.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

PL/SQL Code:

DECLARE
  n number:= &first_n_number;
BEGIN
 DBMS_OUTPUT.PUT_LINE ('The first '||n||' numbers are: ');
    for i in 1..n loop
       dbms_output.put(i||'  ');
    END LOOP;
    dbms_output.new_line;
 END;
/

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now