About this SQL compiler
This free online SQL editor gives you a real SQLite database in your browser. Create tables, insert data, join them and run queries, then see the results as a table straight away.
Each time you press Run, a fresh empty database is created, so your script should include the CREATE TABLE and INSERT statements it needs. That makes every run repeatable, which is handy for practising and for testing a query before using it elsewhere.
How to use it
- Write your SQL in the editor. Separate statements with semicolons.
- Include CREATE TABLE and INSERT statements for any data you need, because the database starts empty on every run.
- Press Run (or Ctrl + Enter).
- Each statement that returns rows shows its result as a table in the output panel.
Features
- A real SQLite database running in your browser
- Results displayed as tables
- Joins, aggregates, subqueries, views and triggers
- No login, no install, works on any device
- Dark and light themes, automatic saving, download as .sql
Good to know
- The database lives in memory and is cleared at the start of every run.
- This is SQLite, so some MySQL, PostgreSQL or SQL Server syntax will not work.
Frequently asked questions
Which SQL dialect is this?
SQLite. Standard SQL such as SELECT, JOIN, GROUP BY and subqueries works, but vendor-specific features of MySQL, PostgreSQL or SQL Server may not.
Is my data saved between runs?
No. A new empty database is created each time you press Run, so put your CREATE TABLE and INSERT statements at the top of your script.
Can I run more than one query at once?
Yes. Separate them with semicolons. Every statement that returns rows is shown as its own table.
Is it free?
Yes. There is no sign-up, and the database runs inside your browser.