If you're running PostgreSQL, you can use the built-in generate_series (1) function like:<p><pre><code> SELECT id, random()
FROM generate_series(0, 1000000) g (id);
</code></pre>
There seems to be an equivalent in SQLite: <a href="https://sqlite.org/series.html" rel="nofollow">https://sqlite.org/series.html</a><p>[1] <a href="https://www.postgresql.org/docs/current/functions-srf.html" rel="nofollow">https://www.postgresql.org/docs/current/functions-srf.html</a>