Free SQL sample, test and dummy files

A text file of SQL statements, used for database dumps, migrations and seed data. Download valid SQL test files in 19 exact sizes, from 1 KB to 100 MB, each with a checksum. Or create one of any size up to 1 GB.

Extension
.sql
MIME type
application/sql
Kind
Text
Category
Database

Create a SQL file of any size

Choose any size from 414 bytes to 1 GB. The file is made in your browser, so nothing is downloaded from our server. Smaller files usually finish quickly; generation time depends on your device and format. Larger ones are streamed straight into your downloads list in browsers that support it (current Chrome, Edge and Firefox on computers and Android); elsewhere, such as Safari and every browser on iPhone and iPad, the largest size is lower and is shown below.

SQL files by size

Every file below is a valid SQL script file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.

SQL sample files by size
FileSizeContentsDownload
1 KB SQL samplesample-sql-1kb.sql 1 KB1,024 bytes INSERT statements: 1 Download SQL
5 KB SQL samplesample-sql-5kb.sql 5 KB5,120 bytes INSERT statements: 19 Download SQL
10 KB SQL samplesample-sql-10kb.sql 10 KB10,240 bytes INSERT statements: 43 Download SQL
25 KB SQL samplesample-sql-25kb.sql 25 KB25,600 bytes INSERT statements: 112 Download SQL
50 KB SQL samplesample-sql-50kb.sql 50 KB51,200 bytes INSERT statements: 226 Download SQL
100 KB SQL samplesample-sql-100kb.sql 100 KB102,400 bytes INSERT statements: 455 Download SQL
200 KB SQL samplesample-sql-200kb.sql 200 KB204,800 bytes INSERT statements: 912 Download SQL
500 KB SQL samplesample-sql-500kb.sql 500 KB512,000 bytes INSERT statements: 2,274 Download SQL
1 MB SQL samplesample-sql-1mb.sql 1 MB1,048,576 bytes INSERT statements: 4,650 Download SQL
2 MB SQL samplesample-sql-2mb.sql 2 MB2,097,152 bytes INSERT statements: 9,293 Download SQL
3 MB SQL samplesample-sql-3mb.sql 3 MB3,145,728 bytes INSERT statements: 13,900 Download SQL
5 MB SQL samplesample-sql-5mb.sql 5 MB5,242,880 bytes Statements: 1 CREATE TABLE, 23,095 INSERT Download SQL
10 MB SQL samplesample-sql-10mb.sql 10 MB10,485,760 bytes Statements: 1 CREATE TABLE, 46,100 INSERT Download SQL
15 MB SQL samplesample-sql-15mb.sql 15 MB15,728,640 bytes INSERT statements: 69,130 Download SQL
20 MB SQL samplesample-sql-20mb.sql 20 MB20,971,520 bytes INSERT statements: 92,143 Download SQL
25 MB SQL samplesample-sql-25mb.sql 25 MB26,214,400 bytes INSERT statements: 115,021 Download SQL
30 MB SQL samplesample-sql-30mb.sql 30 MB31,457,280 bytes INSERT statements: 137,830 Download SQL
50 MB SQL samplesample-sql-50mb.sql 50 MB52,428,800 bytes INSERT statements: 229,076 Download SQL
100 MB SQL samplesample-sql-100mb.sql 100 MB104,857,600 bytes INSERT statements: 457,192 Download SQL

More SQL samples

Hand-designed files with realistic content or a specific edge case.

Curated SQL sample files
FileSizeContentsDownload
Sample customers SQL script (100 rows)sample-customers.sql 19.3 KB19,787 bytes Statements: 1 CREATE TABLE, 100 INSERT Download SQL

What is an SQL file?

A .sql file is a list of statements for a database to execute in order: creating tables, inserting rows or changing a schema. Database dump tools produce them, and migration tools consume them.

SQL is standardised, but every database has its own dialect. A script written for one engine often needs changes for another.

How to recognise an SQL file

SQL files have no file signature, the magic bytes that most binary formats begin with.

No signature bytes. SQL files are identified by parsing their content.

Extension.sql
MIME typeapplication/sql
StandardISO/IEC 9075
Statement separatorSemicolon
Comments-- to end of line, or /* */
EncodingUsually UTF-8

What to test for

These are the behaviours that most often go wrong when software handles SQL files.

Strengths of SQL

  • Runs directly in a database with no import tool.
  • Carries the schema and the data together.

Limitations of SQL

  • Dialects differ, so a script written for one engine may fail on another.
  • Row-by-row INSERT statements are slow for large volumes.

Typical uses of SQL test files

  • Seeding development and test databases
  • Testing import features in database tools
  • Checking migration runners with large scripts

Software that opens SQL

  • psql, mysql and sqlite3 command-line clients
  • DBeaver, DataGrip and pgAdmin
  • Flyway, Liquibase and other migration tools

Specifications

Related

SQL sample files: questions

Which databases can run the sample scripts?
They use portable syntax and have been run on SQLite. PostgreSQL, MySQL and MariaDB accept the same statements.
What is the MIME type of an SQL file?
The MIME type is application/sql. The file extension is .sql.
Is a sample SQL file the same as a dummy or example SQL file?
Yes. Sample, test, dummy and example SQL files are different names for the same thing: an SQL file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy SQL file.