Generate an integer sequence in MySQL

前端 未结 16 2703
南旧
南旧 2020-11-22 06:47

I need to do a join with a table/result-set/whatever that has the integers n to m inclusive. Is there a trivial way to get that without just buildi

16条回答
  •  孤独总比滥情好
    2020-11-22 07:08

    You appear to be able to construct reasonably large sets with:

    select 9 union all select 10 union all select 11 union all select 12 union all select 13 ...
    

    I got a parser stack overflow in the 5300's, on 5.0.51a.

提交回复
热议问题