i want to display 1 to 10 numbers using one select statement.
Answers were Sorted based on User's Feedback
Answer / gangadhar
SQL> select *
2 from xmltable('for $i in 1 to 10 return $i');
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
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
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
What is the fastest way of accessing a row in a table?
What are sql*plus environment variables?
what are the authentication modes in sql server? How can it be changed? : Sql dba
how to give permission to users that users can update/insert/delete on a row of table on timeing 10am to 6pm only?
What is the use of sql trace?
What is a stored procedure ?
What are user defined functions?
Can we use ddl commands in pl sql?
How can a function retun more than one value in oracle with proper example?