SQL Test Data Generator

Next

Pick a table name and a row count, and this generator produces ready-to-run MySQL INSERT statements you can paste straight into a client. Each row fills a fixed four-column layout, id, name, email and active, with sequential sample values (1, 'User 1', 'user1@example.com', plus a random 0/1 flag). It is a fast way to seed a scratch table for a demo or a query test, not a full schema-aware data factory.

How the generator works

  1. 1

    Name your table

    Type the destination table name (defaults to `users`). Any character that is not a letter, number or underscore is replaced with `_`.

  2. 2

    Choose how many rows

    From 1 to 200 rows per run. Larger numbers are clamped to 200.

  3. 3

    Generate the INSERTs

    One `INSERT INTO ... VALUES (...)` statement per row is produced instantly, with no schema or database connection needed.

  4. 4

    Copy and run

    Copy the statements into your MySQL client or a `.sql` file and execute them against a throwaway table.

Columns each row fills

Every generated row targets the same fixed four columns:

Column Type Sample value Notes
id integer 1, 2, 3 Sequential, starts at 1
name text 'User 1' Row number appended
email text 'user1@example.com' Uses the example.com domain
active boolean/int 0 or 1 Random per row

Example output

INSERT INTO `users` (`id`, `name`, `email`, `active`) VALUES (1, 'User 1', 'user1@example.com', 0);
INSERT INTO `users` (`id`, `name`, `email`, `active`) VALUES (2, 'User 2', 'user2@example.com', 1);
INSERT INTO `users` (`id`, `name`, `email`, `active`) VALUES (3, 'User 3', 'user3@example.com', 1);

Good to know

  • Fixed columns. The layout is always id, name, email, active; you cannot add or rename columns here. If your table differs, edit the statements afterwards or create a matching scratch table.
  • MySQL syntax. Identifiers are wrapped in backticks. On PostgreSQL, SQL Server or SQLite, remove the backticks (or convert them to double quotes) before running.
  • Sample data, not realistic data. Names and emails are sequential placeholders (User 1, user1@example.com), so they are easy to spot and never belong to real people. They are not drawn from a names dataset.
  • Up to 200 rows. The count is clamped between 1 and 200. For bigger seed sets, run the generator several times or script the same pattern yourself.

Frequently Asked Questions

Every statement targets the same four columns: id (a sequential integer), name (User 1, User 2, …), email (user1@example.com, …) and active (a random 0 or 1). The layout is fixed and cannot be changed in the tool.

Yes. Copy the statements into a .sql file and run mysql -u user -p db < file.sql, or paste them into any MySQL client. Make sure the target table has matching id, name, email and active columns.

Not in this tool. The columns and the sequential sample values are fixed, which keeps the data obviously synthetic. For custom column sets or realistic fake names, edit the generated SQL or use a dedicated data-factory library such as Faker.

It produces MySQL, with identifiers in backticks, and between 1 and 200 rows per run (higher values are reduced to 200). For PostgreSQL, SQL Server or SQLite, strip the backticks or convert them to double quotes first.

Related Tools

Tool available in other languages