How to create a 1M record table with a single query

Costas

Administrator
Staff member
Let’s say you want to check how a query behaves on a large table - but there is no such table at hand. This is not a problem if your DBMS supports SQL recursion: lots of data can be generated with a single query. The WITH RECURSIVE clause comes to the rescue.

https://antonz.org/random-table/
 
Top