This is how I do it. You can cross join the derived table to itself if you need more rows.
Much more performant and naturally relational way of generating data than looping recursively.
Much more performant and naturally relational way of generating data than looping recursively.
Gotta select row number on some big enough table!