How to create a 1M record table with a single query
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.
Source: How to create a 1M record table with a single query, an article by Anton Zhiyanov.