Generate rows

How to generate rows for test data?

Test data is essential for validating the correctness and robustness of data integration processes and for conducting performance tests on individual SQL statements.

When a large number of rows is required, it is usually more efficient to use the row- or number-generating functions provided by the database, rather than relying on constructs such as recursive CTEs.

SQL Code

select id
  from unnest (generate_array (1, 100000)) as id;