SQLite Forum

Generating random test data using SQL

Generating random test data using SQL

(1) By Simon Slavin (slavin) on 2021-03-24 20:46:59 [link] [source]

Would someone like to take a look at


and come up with a useful SQLite version ?

(2) By Keith Medcalf (kmedcalf) on 2021-03-24 21:06:22 in reply to 1 [link] [source]

That is SQLite3. You will note the sqlite> prompts.

(3) By Ryan Smith (cuz) on 2021-03-24 21:45:29 in reply to 2 [link] [source]

You will note the sqlite> prompts.

Not to mention that the second paragraph from the top opens with:

I’m going to use SQLite, but the same (or similar) queries will work for PostgreSQL and other DBMSs....

I think Anton is on the forum too, I recognize his name (though it might be from somewhere else).

Either way, nice article Simon, thanks for the link. I'm adding it to my list.

(4) By anonymous on 2021-03-24 22:26:26 in reply to 1 [link] [source]

Useful link.

See here for pseudo random sales data in CSV format containing various table sizes ranging from 100 to 5,000,000 records (which exceeds Excel's 1,048,576 row limit). The CSV files can be easily imported into an SQLite database using .import

(5) By anonymous on 2021-03-25 09:22:58 in reply to 1 [link] [source]

faker.js is a very useful tool for this.

Can generate all sorts of fields, names, dates, locations, emails etc...


It can presumably produce csv files that can be .imported.

(6) By Simon Slavin (slavin) on 2021-03-25 12:59:53 in reply to 2 [source]

Good grief. What's wrong with me ? Thanks for noticing.