i want to display 1 to 10 numbers using one select statement.

Answer Posted / kriti sinha

For in 10 rows in a single column
select level from dual connect by level<=10

for 10 numbers in a single column
select 1||chr(10)||2||chr(10)||3||chr(10)||4||chr(10)
||5||chr(10)||6||chr(10)||7||chr(10)||8||chr(10)||9||chr(10)
||10 from dual;

For 10 rows in 10 columns
select 1,2,3,4,5,6,7,8,9,10 from dual;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which column of the user triggers data dictionary view displays the database event that will fire the trigger?

778


Why do we need cursors in pl sql?

721


What is prepared statement in sql?

750


Why we use pl sql?

710


What is the use of primary key?

731






What is join view in sql?

698


Does group by remove duplicates?

754


how to get a list of all tables in a database? : Sql dba

692


what is try_catch block in procedure

1393


How many parts of a pl sql block are optional?

713


Is pl sql useful?

722


Where can I learn sql for free?

702


Why is nosql good?

778


What is difference between stored procedures and application procedures?

764


Explain the the update statement in sql?

770