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 are data types in pl sql?

828


What are the types of variable use in pl sql?

780


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

923


What is the use of index in sql?

796


What are the uses of sysdate and user keywords?

875


what are the 'mysql' command line options? : Sql dba

782


What is a sql statement?

716


What is index example?

777


What are triggers and its types?

807


Why is stored procedure faster than query?

745


How do you create an update query?

725


What is sql catalog?

800


Can we use insert statement in function?

774


What is the maximum number of triggers, you can apply on a single table?

768


What is sql*loader?

797