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

What does the argument [or replace] do?

581


How many types of literals are available in pl sql?

516


Why stored procedure is better than query?

511


What kind of join is join?

559


Can we join tables without foreign key?

522






What are the types of queries in sql?

524


What is raid? How does it help storage of databases?

603


Does oracle roll back the transaction on an error?

537


What is function and procedure?

569


Which are the different case manipulation functions in sql?

539


What is the difference between clustered and non-clustered index in sql?

523


How to read xml file in oracle pl sql?

509


What is execution plan in sql?

550


How do you drop a trigger?

544


What are the topics in pl sql?

521