|
|
|
|
|
by etaioinshrdlu
1910 days ago
|
|
If your DB doesn't support this technique, you might be able to use this rather disgusting technique, which builds an exponentially growing tower of rows by using nested queries with JOIN's. https://stackoverflow.com/a/61169467 |
|
You can also use simple window functions to make a sequence from a system table that you know will have a few thousand rows:
Or if you just need a few thousand rows to hang randomly generated data from you don't even need the function.All a bit hacky compared to some DBs that have sequence support, but useful for generating test data or numbers tables where that isn't supported.