Home » SQL & PL/SQL » SQL & PL/SQL » Numbers from 1 to 10
Numbers from 1 to 10 [message #299554] Tue, 12 February 2008 07:30 Go to next message
asadkhan_2
Messages: 35
Registered: January 2008
Member
I want to show numbers from 1 to 10
like this
1
2
3
;;;;
10
not from any table how can we do this
thanks
Re: Numbers from 1 to 10 [message #299556 is a reply to message #299554] Tue, 12 February 2008 07:37 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search for "row generator" or go to "General" forum there is a whole topic just for this.

Regards
Michel
Re: Numbers from 1 to 10 [message #299559 is a reply to message #299554] Tue, 12 February 2008 07:38 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
search for row generator.

But if using your exact words of not using a table, any table, then how would you expect to get any data when everything SELECT statement needs to select from a table.
Re: Numbers from 1 to 10 [message #299810 is a reply to message #299554] Wed, 13 February 2008 04:50 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Atleats you should Refer Virtual table "DUAL" Smile

Thumbs Up
Rajuvan.
Re: Numbers from 1 to 10 [message #299832 is a reply to message #299554] Wed, 13 February 2008 06:02 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi,

I hope this will works.

define m=10

SELECT ROWNUM
FROM ( SELECT 1 FROM DUAL
GROUP BY CUBE(1,2,3,4,5,6,7,8,9,10) )
WHERE ROWNUM <= &&M

Thanks

Mano
Re: Numbers from 1 to 10 [message #299838 is a reply to message #299832] Wed, 13 February 2008 06:16 Go to previous messageGo to next message
raghuram.sundar
Messages: 11
Registered: February 2008
Location: CHENNAI,INDIA
Junior Member

hi

could u explain what what is CUBE here?? in this statement
Re: Numbers from 1 to 10 [message #299840 is a reply to message #299554] Wed, 13 February 2008 06:20 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member


Cube, Rollup

Thumbs Up
Rajuvan
Re: Numbers from 1 to 10 [message #299841 is a reply to message #299554] Wed, 13 February 2008 06:20 Go to previous message
spmano1983
Messages: 269
Registered: September 2007
Senior Member

http://www.orafaq.com/node/56
Previous Topic: please explain this statement
Next Topic: total
Goto Forum:
  


Current Time: Sat Dec 10 04:59:58 CST 2016

Total time taken to generate the page: 0.05555 seconds