ToolXkit Icon

Sample SQL files

Free SQL test files from 5 KB to 1 GB. Pick a size and download, or type any size you need.

  • 5 KB SQL

    22 rows of data

  • 10 KB SQL

    46 rows of data

  • 100 KB SQL

    469 rows of data

  • 500 KB SQL

    2,337 rows of data

  • 1 MB SQL

    4,666 rows of data

  • 5 MB SQL

    Made on your device

  • 10 MB SQL

    Made on your device

  • 25 MB SQL

    Made on your device

  • 50 MB SQL

    Made on your device · saved in pieces

  • 100 MB SQL

    Made on your device · saved in pieces

  • 500 MB SQL

    Made on your device · saved in pieces

  • 1 GB SQL

    Made on your device · saved in pieces

Need another size?

Type any size from 5 KB to 1.00 GB. The file is made on your device. Nothing is uploaded or stored.

Free for any use, including commercial. Made by this site, with no third-party content and no signup.

What is inside

  • A comment line, then CREATE TABLE employees with 9 columns: id, name, email, role, department, city, started, salary, active
  • One INSERT per row: 46 in the 10 KB file, 4,666 in the 1 MB file, 115,302 in the 25 MB file
  • Apostrophes escaped the SQL way, so O'Brien is written as 'O''Brien'
  • DATE values as 'YYYY-MM-DD' and booleans as TRUE or FALSE
  • UTF-8 names with accents, such as García and Müller
  • Each file is exact to the byte, filled with a -- comment line at the end

Try it with these tools

They run in your browser. The file you downloaded stays on your device.

About SQL files

An .sql file is a plain-text script of SQL statements. Databases do not open it like a document; they run it, one statement after another. A dump, like these files, usually creates a table and then fills it with INSERT statements.

SQL files move data between machines: a backup from production, seed data for a test database, or a table shared with a colleague. They are also what phpMyAdmin, pgAdmin and most hosting panels ask for on their import screen, and those screens often have a size limit.

The common problem is the dialect. PostgreSQL, MySQL, SQLite and SQL Server each have their own types, quoting rules and extra syntax, so a dump from one can fail on another. These files stay with plain types and single-quoted strings so they load on all three of the common open-source databases.

Sources: INSERT, PostgreSQL documentation · INSERT, MySQL 8.0 reference manual · INSERT, SQLite documentation

Questions

Which databases can import these SQL files?

They are written for PostgreSQL, MySQL 8 and SQLite. Import into an empty database, because the script creates a table called employees and fails if one already exists.

Why do the SQL files land on the exact byte when the CSV files do not?

SQL allows comments, so the space left after the last INSERT is filled with a -- comment line. A CSV has no comment syntax, so it can only stop at the last whole row.

Is the data real?

No. Names, cities and salaries are picked by a seeded generator from short fixed lists, and every email address uses example.com, a domain reserved for examples. You can use the files for anything.

Also searched as: sample sql file download, dummy sql file, test sql file, example sql file, 1 MB sql file, 10 MB sql file, 100 MB sql file, 1 GB sql file, free sql for testing.

For developers: exact bytes and SHA-256

Sizes are decimal (1 MB = 1,000,000 bytes). The hosted files never change between builds, so these checksums stay valid.

FileBytesSHA-256
sample-5kb.sql 5,000 bytes 02ae9d251fea42b8eb930806f852b34a22c3520f664bf65a42ea66a39c87a292
sample-10kb.sql 10,000 bytes e8e7a8dfee6c2782408eea9f34665fc6f644607e164c6e4bf61fb89418e6619d
sample-100kb.sql 100,000 bytes b0d12178e127344d165b0a435b9f40c1072a81d4b6fead203cf9430c72a611ee
sample-500kb.sql 500,000 bytes 3febee8a8ff5d1ff56b5cd58de12bbdd4c3ee463cc16fbdd378b41de60d3651d
sample-1mb.sql 1,000,000 bytes 56a1b94b2b742902f83a6d8c3cdce02e1990bff7eacc9673ef1d0a4820e22da1