Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?

1134


What are the sql commands?

1165


How do you remove duplicate records from a table?

936


explain mysql aggregate functions. : Sql dba

981


What is a procedure in pl sql?

1206


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

991


Is foreign key mandatory?

998


What is difference between ms sql and mysql?

956


What is scalar data type in pl sql?

1060


Can a select statement fire a trigger?

1152


What is left join example?

940


How do I order by ascending in sql?

1003


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

1114


What is the use of sql trace?

947


What is difference between sql and excel?

1081