A SQL INSERT generator turns fake records into a seed script you can run straight against your database. Pick the columns, choose PostgreSQL, MySQL, SQLite or SQL Server, and you get an optional CREATE TABLE, correctly quoted identifiers, and literals each engine accepts — so psql -f seed.sql works the first time instead of failing on row 1 with a type error.
The dialect differences are the whole job. T-SQL has no TRUE, MySQL's JSON column rejects a Postgres array literal, and neither MySQL nor SQL Server takes a timestamp ending in Z. A 1,500-row script with every field type loads cleanly into PostgreSQL 16, MySQL 8.4, SQL Server 2022 and SQLite 3.
How to use it
- Tick the columns. Each row is one coherent imaginary person, so
fullName,emailandusernamematch. - Set the table name and pick a dialect.
- Choose options: include
CREATE TABLE, write one multi-rowINSERTor one statement per row, wrap everything in a transaction, and truncate the table first. - Set the row count (up to 2,000), download the
.sqlfile and run it.
psql "$DATABASE_URL" -v ON_ERROR_STOP=1 -f seed.sql # PostgreSQL
mysql -u root -p app_dev < seed.sql # MySQL / MariaDB
sqlite3 dev.db < seed.sql # SQLite
sqlcmd -S localhost -U sa -C -b -i seed.sql # SQL Server
What you can control
- Four dialects with the right identifier quotes:
"double"for PostgreSQL and SQLite,`backticks`for MySQL,[brackets]for SQL Server. - Per-dialect column types —
TIMESTAMPTZ,DATETIME,DATETIME2orTEXT;UUID,CHAR(36)orUNIQUEIDENTIFIER;BOOLEAN,BITorINTEGER. - Per-dialect literals for booleans, arrays and timestamps, and
N'…'strings for SQL Server. - Multi-row
INSERTs split into batches of 1,000, or one statement per row. - An optional transaction wrapper and
TRUNCATE(orDELETE FROMon SQLite). - Thirty-three field types, from ids and UUIDs to prices, scores, tags and timestamps.
What the dialects disagree on
| PostgreSQL | MySQL | SQLite | SQL Server | |
|---|---|---|---|---|
| Boolean literal | TRUE |
TRUE |
1 |
1 |
| Array of tags | '{a,b}' into TEXT[] |
'["a","b"]' into JSON |
JSON text | JSON text in NVARCHAR(MAX) |
| Timestamp | '2026-03-22T22:19:14Z' |
'2026-03-22 22:19:14' |
ISO text | '2026-03-22 22:19:14' |
| Unicode strings | 'Zoë' |
'Zoë' |
'Zoë' |
N'Zoë' |
Rows per VALUES |
no limit | max_allowed_packet |
no fixed limit | 1,000 |
Testing ideas
- Run it in CI. Start a database container, load the seed, then run your integration tests against it. Keep
ON_ERROR_STOP(or-bfor sqlcmd) on so a bad row fails the build instead of being skipped. - Apostrophes and Unicode. Names like O'Brien and Zoë are where hand-written seed scripts break. Generate a few hundred rows and grep for
''to confirm escaping. - Volume. 2,000 rows is enough to make an unindexed query visibly slow. Generate several batches with different seeds for more.
- Idempotency. Turn on truncate and the transaction wrapper, and run the script twice. The row count should be the same both times.
What this is not
This writes data, not migrations. It will not add foreign keys, indexes or constraints beyond the primary key, and the CREATE TABLE is a convenience for scratch databases. For schemas with relationships, read How to seed a database with fake data.