🗄️

Online SQL Playground

Run SQL against built-in sample datasets and see results immediately, with custom schemas, multi-statement runs and CSV or JSON export
Local 📂 Developer 👤 ToolWorld 🏷️ v1.1.0
Run SQL Execute SQL against built-in sample tables and see results immediately

Dataset

Query

Separate several statements with semicolons to run them in order

Execution result

Results appear after execution

How to Use

📖 About this tool


Checking whether a piece of SQL is correct, or simply practising, normally means installing a database, creating tables and loading data before any query runs. This removes all of that: several sample datasets are built into the page, so you can write SQL immediately and see a result table the moment you click run, with nothing to install and no server to reach.

Four datasets are included: employees and departments, orders and products, students and grades, and books and loans. Each has sensible columns and enough rows to practise WHERE filtering, ORDER BY sorting, GROUP BY aggregation, JOIN relationships and subqueries. Custom mode lets you write your own CREATE TABLE and INSERT statements instead.

Results appear as a table with the row count, column count and elapsed time. Failures name the cause: a missing table, an unknown column, syntax that could not be parsed, or a function that is not supported. Several statements separated by semicolons run in order, which suits a full create-then-query flow.

Everything executes in the browser with no network use and no database connection, so nothing leaves the machine. Results can be exported as CSV or JSON for use elsewhere.

✨ Features

  • Four datasets: employees, orders, students and library loans, ready to query.
  • Custom schema: write your own CREATE TABLE and INSERT statements.
  • Common syntax: SELECT, WHERE, ORDER BY, GROUP BY, HAVING, JOIN and aggregates.
  • Multi-statement runs: semicolon separated, executed in order.
  • Clear errors: missing tables, unknown columns and unsupported functions are named.
  • Run statistics: rows, columns and elapsed time at a glance.
  • Two exports: CSV and JSON.

🚀 How to use

  1. Pick a dataset, or switch to custom mode and create your own tables.
  2. Write SQL, separating multiple statements with semicolons.
  3. Click Run to see the result table and the run statistics.
  4. If it fails, follow the message and check table names, columns or syntax.
  5. Click reset to return the data to its original state.
  6. Export CSV or JSON once the result is what you wanted.

⚠️ Notes

  • Built for learning and checkingThe lightweight engine covers common syntax and is not identical to any database.
  • No real databaseData lives in browser memory and returns to its seed state on refresh.
  • Some functions are absentUnsupported functions produce a clear message rather than a silent wrong answer.
  • Results are cappedBeyond the limit rows are truncated with a notice, to avoid rendering too much at once.
  • Local onlyNo network, no upload; neither statements nor data are recorded.

Most SQL mistakes are small and immediate: a wrong column name, a join that multiplies rows, an aggregate that swallows the detail you wanted. Seeing the result instantly, against data you can inspect, teaches those lessons far faster than reading about them. Because the whole engine runs in the browser, experimenting with queries costs nothing and leaves no trace.

The datasets are small on purpose. A few hundred rows are enough to expose the classic mistakes, such as a join that duplicates rows or a group by that collapses something you needed, while keeping every result readable rather than a wall of numbers. Once a query behaves correctly here it can be moved to a real database with confidence that the logic is sound, which is the part that actually transfers.

Related

⏫︎
💬