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 a pl/sql package consist of?

764


What are the different operators available in sql?

802


What is the difference between clustered and non-clustered indexes?

869


who introduced sql?

797


What are the types of dbms?

771


how to extract a unit value from a date and time? : Sql dba

786


Can we use pl sql in mysql?

767


What is union, minus and interact commands?

994


Are there any features that are decommissioned in 11g that are not present in 11g?

1893


Can %notfound return null after a fetch?

815


What is rownum in sql?

810


what is the difference between group by and order by in sql? : Sql dba

834


Do we need commit after truncate?

873


Can we rollback truncate?

778


How do I count duplicates in sql?

810