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.

Answers were Sorted based on User's Feedback



i want to display 1 to 10 numbers using one select statement...

Answer / manoj

select level from dual connect by level<=10

Is This Answer Correct ?    113 Yes 18 No

i want to display 1 to 10 numbers using one select statement...

Answer / mkumar.it

select rownum from user_objects where rownum <= 10

Is This Answer Correct ?    71 Yes 20 No

i want to display 1 to 10 numbers using one select statement...

Answer / pramod kumar behera

select rownum from dual connect by level <=10;

Is This Answer Correct ?    6 Yes 0 No

i want to display 1 to 10 numbers using one select statement...

Answer / pramod kumar behera

select level from dual connect by level <=10;

Is This Answer Correct ?    7 Yes 1 No

i want to display 1 to 10 numbers using one select statement...

Answer / srikanth

select rownum from user_objects where rownum <= 10 order by
rownum ASC

Is This Answer Correct ?    12 Yes 9 No

i want to display 1 to 10 numbers using one select statement...

Answer / raghuramu

select rownum from emp
where rownum<=10;

Is This Answer Correct ?    13 Yes 10 No

i want to display 1 to 10 numbers using one select statement...

Answer / 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

i want to display 1 to 10 numbers using one select statement...

Answer / nagesh

SELECT * FROM EMP WHERE ROWNUM<=10 ORDER BY ENO;

Is This Answer Correct ?    6 Yes 3 No

i want to display 1 to 10 numbers using one select statement...

Answer / srinivas

select rownum rn from (select 1 from dual group by
cube(1,2,3,4,5)) where rownum <=10

Is This Answer Correct ?    1 Yes 0 No

i want to display 1 to 10 numbers using one select statement...

Answer / sumit

declare
abc varchar2(500) ;
begin
select 1||chr(0)||2||chr(0)||3 ..... into
abc from dual;
dbms_output.put_line(abc);
end;

cannot use chr(10) to take columns in sql.

way is to use rownum,row_number or any psuedo column like
sequence

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is pl sql code?

0 Answers  


What is the use of cursor ? how cursor allocate context area for executing the sql statement?

4 Answers   HCL,


i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

1 Answers  


What is a trigger in pl/sql?

1 Answers  


what is definer rights invoke rights?

1 Answers  


What is difference between pl and sql?

0 Answers  


Can we use distinct and group by together?

0 Answers  


Difference between NVL, NVL2 and NULLIF

1 Answers   CTS, Metric Stream,


Is sql workbench free?

0 Answers  


How do I run a script in sql developer?

0 Answers  


TABLE A TABLE B EMPNO ENAME EMPNO ENAME 1 A 1 A 2 B 2 B 3 C 3 C 4 D 4 D 5 E 5 E 6 F 7 G HOW TO GET THE UNMATCHED RECORDS IN SQL QUERY?

10 Answers   Satyam,


what are the different type of normalization? : Sql dba

0 Answers  


Categories