How do I generate a range of consecutive numbers (one per line) from a MySQL query so that I can insert them into a table?
For example:
nr 1 2 3 4 5
As you all understand, this is rather hacky so use with care
SELECT id % 12 + 1 as one_to_twelve FROM any_large_table group by one_to_twelve