Hi,

On Thu, Apr 3, 2008 at 3:25 AM, nataliew
<[EMAIL PROTECTED]> wrote:
>
>  I need querylike this that make a row of numbers (in one execute)
>
>  SELECT a from (
>  SELECT -1 a UNION ALL
>  SELECT -2 UNION ALL
>  SELECT -3 UNION ALL
>  SELECT -4 UNION ALL
>  SELECT -5 UNION ALL
>  SELECT -6 UNION ALL
>  SELECT -7 UNION ALL
>  SELECT -8 UNION ALL
>  SELECT -9) t;

That's the best way to write it if you don't want to refer to any
tables.  However, I like to have a table handy to generate such
sequences of numbers:

http://www.xaprb.com/blog/2005/12/07/the-integers-table/

Regards
Baron

-- 

Baron Schwartz, Senior Consultant, Percona Inc.
Tel: +1 888 401 3401 ext 507
24/7 Emergency Line +1 888 401 3401 ext 911
Our Services: http://www.percona.com/services.html
Our Blog: http://www.mysqlperformanceblog.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to