Skip to content

Online SQL Compiler (SQLite)

Practise SQL online: create tables, insert rows and run SELECT, JOIN, GROUP BY and more on SQLite. Results show as tables. A fresh database every run.

Private · on device. Runs in your browser: your file is not uploaded. No sign-up.

main.sql
Output

Press Run (or Ctrl+Enter) to see the output here.

How to use an online SQL compiler (SQLite)

  1. Write the statements that make your tables, the rows that fill them, then your query.
  2. Press Run (or Ctrl+Enter).
  3. Each SELECT shows its rows as a table; other statements show how many rows changed.

Learning to code? The free courses in the Learn section go from beginner to expert, with tasks checked in this same editor. Other languages: all languages, Python, JavaScript, TypeScript, HTML, CSS & JS.

Frequently asked questions

Which database is this?

SQLite, the small database used in phones and browsers. Standard SQL works: SELECT, WHERE, JOIN, GROUP BY, HAVING, subqueries, views, indexes and transactions.

Is the data kept between runs?

No. Each run starts with an empty database, so put your CREATE TABLE and INSERT statements above your query. Your SQL itself is kept on this device.

Is it the same as MySQL?

Mostly. Basic queries are the same. A few things differ, such as AUTO_INCREMENT (in SQLite, INTEGER PRIMARY KEY does it) and some date functions.

Is my SQL uploaded?

No. SQLite runs inside your browser.