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

SELECT LEVEL
FROM DUAL
CONNECT BY LEVEL<=9;

Is This Answer Correct ?    0 Yes 0 No

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

Answer / gangadhar

SQL> select *
2 from xmltable('for $i in 1 to 10 return $i');

Is This Answer Correct ?    0 Yes 0 No

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

Answer / hemant

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
/

Is This Answer Correct ?    6 Yes 12 No

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

Answer / pushkar

use sequence. automatically increments.

Is This Answer Correct ?    10 Yes 27 No

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

Answer / rashmi raju

select 1,2,3,4,5,6,7,8,9,10 from dual;

Is This Answer Correct ?    3 Yes 20 No

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

Answer / ameer mujahid

select rownum from employees;

Is This Answer Correct ?    0 Yes 19 No

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

Answer / aditya

select 1,2,3,4,5,6,7,8,9,10

Is This Answer Correct ?    1 Yes 27 No

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

Answer / seshu

select in(1,10)
from dual;

Is This Answer Correct ?    15 Yes 71 No

Post New Answer

More SQL PLSQL Interview Questions

Hi, Can anybody please explain me the flow of the below query. I am not able to understand how this query works. This query is for finding the Nth highest salary.. SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); If N = 2 then second highest salary will be the o/p. If N = 3 then third highest salary will be the o/p. and so on.. Thanks, Nitin

5 Answers   Deloitte, Ness Technologies,


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

0 Answers  


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

0 Answers  


What is the fastest way of accessing a row in a table?

5 Answers   TCS,


What are sql*plus environment variables?

0 Answers  






what are the authentication modes in sql server? How can it be changed? : Sql dba

0 Answers  


how to give permission to users that users can update/insert/delete on a row of table on timeing 10am to 6pm only?

4 Answers   TCS,


What is the use of sql trace?

0 Answers  


What is a stored procedure ?

5 Answers  


What are user defined functions?

0 Answers  


Can we use ddl commands in pl sql?

0 Answers  


How can a function retun more than one value in oracle with proper example?

0 Answers  


Categories