SQL formatter
FAQ
SQL (Structured Query Language) is a standard programming language specifically designed for managing and manipulating relational databases. It is used to query, insert, update, and delete data, as well as to manage database schema and control access to the database.
SQL commands can be broadly categorized into the following types:
- DDL (Data Definition Language): Commands like
CREATE,ALTER,DROP, which define the structure of the database. - DML (Data Manipulation Language): Commands like
SELECT,INSERT,UPDATE,DELETE, which are used for data manipulation. - DCL (Data Control Language): Commands like
GRANT,REVOKE, which control access to the data. - TCL (Transaction Control Language): Commands like
COMMIT,ROLLBACK, which manage transactions in the database.
A primary key is a field in a table which uniquely identifies each row/record in that table. Primary keys must contain unique values, and cannot contain NULL values. A table can have only one primary key, which can consist of single or multiple columns (fields).
The SQLite database runs and stays in your browser. Save workspace locally stores a database snapshot and query tabs in this browser's IndexedDB, without an upload or account. Share query includes only query text, not database contents. If you choose Ask AI, your messages and included context are sent to the AI service. Inspect or exclude schema, SQL, and errors before sending: they can contain sensitive values. Row results are excluded unless you enable result sharing. Previously sent content remains in the conversation.
You can load a SQLite database file or import CSV and TSV files. CSV and TSV files are converted into a local SQLite table so you can query them immediately.
The playground uses SQLite. Most common SQL statements such as SELECT, JOIN, GROUP BY, INSERT, UPDATE, DELETE, CREATE TABLE, indexes, and transactions work, but database-specific features from MySQL, PostgreSQL, and SQL Server may differ.
Use Workspace > Save workspace locally to save the database, all query tabs, and the active tab in this browser's IndexedDB. Reopen it from Saved workspaces (local). Results and history are not saved, and later edits are not saved automatically. Share query creates a link containing only the active query, not the database or results.
No. Signing in lets you bookmark the tool, but does not back up or sync SQL workspaces to your account. Explicitly saved workspace snapshots survive reloads in the same browser; unsaved changes do not. Browser cleanup or storage eviction can remove local saves. Export a ZIP backup from Saved Workspaces or download the database to keep a separate copy. Older query-only saves still restore just the query without replacing your database.
No AI tool changes your live database. Ask explains SQL without tools. Agent modes can run read-only queries locally, put the SQL in a query tab, and show rows in the playground Results panel. This works without sharing results with AI. Agent + review asks before drafting or replacing SQL; Agent applies those edits directly with Undo. Writes and schema changes still require you to review the SQL and press Run yourself. AI runs use a bounded, cancellable worker against a main-database snapshot. Selecting Query results in Context optionally sends rows back to AI; that permission resets when the database state changes.