Loading…

Online SQL Playground (SQLite)

This is a real SQL database running inside your browser. You can create tables, insert data, and run SELECT, UPDATE, DELETE and JOIN queries, then see the results as a table.

Each run starts from an empty database, so you always know exactly what data you are working with. That makes it a safe place to practise SQL and to test a query before you use it on real data.

Things to try

  • Create a table with CREATE TABLE and add a few rows with INSERT.
  • Filter rows with WHERE and sort them with ORDER BY.
  • Make two tables and connect them with a JOIN.
  • Group rows and count them with GROUP BY and COUNT().
  • Insert a NULL value and see how it behaves in comparisons.

How it works

The playground uses sql.js, which is SQLite compiled to WebAssembly. The database engine is downloaded once and then runs fully on your computer. Your queries are never sent to a server.

Because it is SQLite, the syntax follows SQLite's rules. Most everyday SQL works the same way as in MySQL or PostgreSQL, but a few features, such as some data types and functions, are different.

Frequently asked questions

Is this a real database or a simulation?

It is real. The playground runs SQLite itself, compiled to WebAssembly, so your queries are executed by a genuine database engine.

Is my data saved between runs?

No. Every run starts with an empty database. Put your CREATE TABLE and INSERT statements at the top of the editor so the data is created each time.

Can I use MySQL or PostgreSQL syntax?

Most standard SQL works. Some database-specific features, like certain data types or functions, are different in SQLite. If a query fails, check whether it uses a feature that only one database supports.

Do I need an account?

No. The SQL playground is free and needs no signup.