Online SQL Editor

Create tables, add rows and run queries. Results show as a table. It runs SQLite in your browser.

Ln 1, Col 1

Practise SQL online with SQLite

Write several SQL statements and press Run. Each SELECT shows its result as a table, and other statements show how many rows changed. A new empty database is created for every run, so put your CREATE TABLE and INSERT lines in the same script.

If a table or column name is wrong, a help card suggests the closest name that exists in your script. Press Format to lay out a long query neatly.

This is SQLite, which is similar to other SQL databases but not identical. Some features of MySQL or PostgreSQL are different.

Frequently asked questions

Which database is this?

SQLite, running in your browser.

Is my data saved?

No. Each run starts with an empty database. Your script is saved in this browser, so you can run it again.

Can I run several queries?

Yes. Separate statements with a semicolon and each result is shown in order.

Does it work with MySQL or PostgreSQL syntax?

Basic SQL is the same, but some commands differ. This runner follows SQLite rules.

Looking for another language? Open the full code editor with 100+ languages.