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

What is denormalization in a database?

1053


What are stored procedures in mysql?

1017


Can we use views in stored procedure?

1031


What is a schema sql?

1150


What is the difference between delete and truncate commands?

1037


How can the performance of a trigger be improved?

1042


How to select 10 records from a table?

1155


How can we optimize a sql query?

1049


what is index? : Sql dba

1004


How can I see all tables in sql?

1071


What is dynamic sql in pl sql?

1033


How to rename a column in the output of sql query?

1072


what is the difference between a web-garden and a web-farm? : Sql dba

1081


How can I delete duplicate rows?

1012


When do we use triggers?

1077