answersLogoWhite

0

You can use a PL/SQL block to display numbers from 1 to n in Oracle. Here's an example program:

DECLARE
    n NUMBER := 10; -- Change this value to your desired n
BEGIN
    FOR i IN 1..n LOOP
        DBMS_OUTPUT.PUT_LINE(i);
    END LOOP;
END;
/

This code declares a variable n, then uses a FOR loop to iterate from 1 to n, printing each number using DBMS_OUTPUT.PUT_LINE. Make sure to enable output in your SQL environment to see the results.

User Avatar

AnswerBot

2mo ago

What else can I help you with?

Related Questions

How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you write a C plus plus program that will display the first 10 positive prime numbers?

By learning how to program on C+.


How do you write a Qbasic program to display these Numbers-0112358132134?

you do this 10 print "0112358132134" use the whole of the thing


What is an Oracle handler?

An Oracle handler is part of the Oracle/JAVA program. The job of a handler is to export messages from a logger. It will usually write them into a file.


How can you write a c program to display numbers in ascending order in array?

I know how to do this and you need to know how to do this. Why don't you do your best at writing this program and if it does not work then ask for help. You will not learn anything if I give you the answer.


How can I write a program to display prime numbers from 1 to 100?

Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.


Write a program to display the name of days when a user enters a number?

write a program to display your name age class schoolname e-mail 2hobby based on choice


Write a program to display your name on computer screen?

Faisal


How do you write a program in c to display numbers from 0 to 9 along with the string?

#include <stdio.h> int main (void) { puts ("0123456789"); return 0; }


Write a program which takes the temperature in farhenheightthe program should display the farhenheight temperature as well as centigrade C equals?

Write a program which takes the temperature in farhenheight.the program should display the farhenheight temperature as well as centigrade. C= (f-32)*5/9


Write c programs to display 10 line biodata?

A C++ program can be used to write C programs that will display 10 lines of biodata. Many types of C programming can be written with a C++ program.


Write a shell program to check and display 10 leap years?

dono