Online SQL Compiler

query.sql
-- Online SQL editor (SQLite)
-- A fresh in-memory database is created every time you press Run.

CREATE TABLE students (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  marks INTEGER
);

INSERT INTO students (name, marks) VALUES
  ('Asha', 82),
  ('Bikash', 91),
  ('Chandra', 76),
  ('Deepa', 88);

SELECT name, marks
FROM students
WHERE marks > 80
ORDER BY marks DESC;
Output

Output will appear here. Press Run or Ctrl + Enter.

Ready

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

  1. Write your SQL in the editor. Separate statements with semicolons.
  2. Include CREATE TABLE and INSERT statements for any data you need, because the database starts empty on every run.
  3. Press Run (or Ctrl + Enter).
  4. 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

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.

Other online compilers