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

how to calculate the difference between two dates? : Sql dba

0 Answers  


How will you debug your procedure? If your procedure is around 2000 lines and the expected output is 10 and we get only output 5.So how will you debug it? Somebody pls give the correct answer?

2 Answers   Fidelity,


What is primary key in db?

0 Answers  


How would you go about increasing the buffer cache hit ratio? 0. Explain the difference between a hot backup and a cold backup and the benefits associated with each 1. You have just had to restore from backup and do not have any control files. How would you go about bringing up this database? 2. How do you switch from an init.ora file to a spfile? 3. Explain the difference between a data block, an extent and a segment. 4. Give two examples of how you might determine the structure of the table DEPT. 5. Where would you look for errors from the database engine? 6. Compare and contrast TRUNCATE and DELETE for a table. 7. Give the reasoning behind using an index. 8. Give the two types of tables involved in producing a star schema and the type of data they hold. 9. What type of index should you use on a fact table? 10. Give two examples of referential integrity constraints. 11. A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables? 12. Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each. 13. What command would you use to create a backup control file? 14. Give the stages of instance startup to a usable state where normal users may access it. 15. What column differentiates the V$ views to the GV$ views and how? 16. How would you go about generating an EXPLAIN plan?

2 Answers  


What is pl sql in dbms?

0 Answers  


What is an invalid partition table?

0 Answers  


How does sql profiler work?

0 Answers  


What is asqueryable?

0 Answers  


Explain what is table in a database?

0 Answers  


What are the advantages and disadvantages, compared to the standard SQL and SQL*plus ?

2 Answers  


define sql update statement ? : Sql dba

0 Answers  


Types of cursors and explanation each of them ?

4 Answers   DELL,


Categories