sql
What is a .sql file?
application/sql
SQL files contain plain-text Structured Query Language statements, typically schema definitions, data inserts, or queries used to build or populate a database. Dialect details vary between engines such as PostgreSQL, MySQL, and SQLite. A dump file often recreates an entire database when executed.
How to use a .sql file
Use an example SQL file to test statement parsing, database restore and migration tooling, and dialect-compatibility of import pipelines.
Download example .sql files
- Postgres SQL DumpA Postgres-flavour SQL dump with a CREATE TABLE and INSERT statements — for testing SQL importers and migrations.
- MySQL SQL DumpA MySQL-flavour SQL dump with backtick-quoted identifiers and engine options — for testing SQL importers.
- E-commerce Database Schema (SQL)A relational SQL schema (products, customers, orders with primary and foreign keys) plus sample INSERTs — the DDL twin of the e-commerce dataset, for testing schema import and migrations.
- SQL — Hello WorldThe classic first query in SQL — a single SELECT of a literal — for testing highlighters, SQL parsers, and query editors.
- SQL — Library schema (DDL, view, join)A realistic SQL script with CREATE TABLE constraints and foreign keys, INSERT seed data, a CREATE VIEW, and a grouped aggregate query with a join — for testing SQL parsers, formatters, and highlighters.
- SQL Window FunctionSQL window function SAMPLE for SQL parsers.
- SQL Lint Shape — Select Star InvalidTiny SAMPLE SQL shape (select-star-invalid) for static-analysis demos — not live DDL.
- SQL Lint Shape — Missing Where UpdateTiny SAMPLE SQL shape (missing-where-update) for static-analysis demos — not live DDL.
and 4 more in the library.