Home » Open Source » MySQL » MySQL (MySQL)
MySQL [message #437037] Wed, 30 December 2009 07:57 Go to next message
tejas.patel
Messages: 22
Registered: December 2008
Location: NJ
Junior Member

how to print 1 to n using dual table in MYSQL.
format Column print

thanks in advance..
reply me.
Re: MySQL [message #437039 is a reply to message #437037] Wed, 30 December 2009 07:59 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
This is an Oracle forum. You may be better served on a MySql forum. However, I am sure someone here will probably know the answer.
Re: MySQL [message #437045 is a reply to message #437037] Wed, 30 December 2009 08:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
There is no DUAL table in MySQL.

You can do it with the following recursive query (also available in Oracle from 11gR2 adding FROM DUAL in the first part of union):
WITH 
  row(nb) AS ( 
    SELECT 1 
    UNION ALL 
    SELECT nb + 1 FROM row WHERE nb < n 
  ) 
SELECT * FROM row

Regards
Michel

[Updated on: Wed, 30 December 2009 08:33]

Report message to a moderator

Re: MySQL [message #437047 is a reply to message #437045] Wed, 30 December 2009 08:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Silly me, it is a MS/SQL solution not a MySQL one, there is nothing in MySQL to generate rows (as far as I know).

Regards
Michel
Re: MySQL [message #437081 is a reply to message #437037] Wed, 30 December 2009 23:18 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
You are asking about buses at railway station! /forum/fa/5767/0/

And Michel sir there is no row generator in MySql. from here.

Quote:
Hate to say this, but MySQL is the only RDBMS of the big four that doesn't have this feature.


regards,
Delna
Re: MySQL [message #437086 is a reply to message #437081] Wed, 30 December 2009 23:49 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Why that link again ? Michel already said that there is nothing... Smile
Is that link to add some more to Michels answer ?
Or you are saying some thing is there to generate !.
There is some difference between
MS SQL and MySQL.
Quote:
In MySQL, nothing.


Quote:
You are asking about buses at railway station!

We have buses at railway station too...(But those were at Outside the station ) Smile

sriram Smile
Re: MySQL [message #437088 is a reply to message #437086] Thu, 31 December 2009 00:33 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Quote:
We have buses at railway station too...(But those were at Outside the station )

/forum/fa/3518/0/
You made 'Popat' of my joke!


regards,
Delna
Re: MySQL [message #437181 is a reply to message #437088] Thu, 31 December 2009 13:58 Go to previous message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
delna.sexy wrote on Thu, 31 December 2009 12:03
Quote:
We have buses at railway station too...(But those were at Outside the station )

/forum/fa/3518/0/
You made 'Popat' of my joke!


regards,
Delna


No such word in My dictionary may be i should Buy a new dict in this new year... Wink Just kidding...Happy New Year Smile

sriram Smile
Previous Topic: Oracle Hetrogeneous Services [Connecting Oracle To MySQL] using ODBC Driver 5.1
Next Topic: How get data from Mysql to Oracle table , by create oracle form
Goto Forum:
  


Current Time: Tue Dec 17 20:09:29 CST 2024