Simple and advanced modes
The playground has two input modes. You can do everything a beginner needs in simple mode, and reach for advanced mode when you want full SQL.
Simple mode (the default)
Section titled “Simple mode (the default)”Simple mode is a friendly, keyword-based command language designed for learning. Commands read close to English:
create table authors with pk author_id(serial)show data authorsSimple mode accepts these learning commands plus the app-level commands
(like save, undo, and help). If you type raw SQL here, the playground
gently points you at advanced mode instead of failing silently.
Advanced mode (SQL)
Section titled “Advanced mode (SQL)”Advanced mode accepts standard SQL — SELECT, INSERT, CREATE TABLE, and
more — alongside the same app-level commands:
select title, published from books where published >= 2000 order by published;Switch modes with the mode command:
mode advancedmode simpleThe mode you leave a project in is remembered and restored the next time you open it, so a project set up for SQL practice reopens in advanced mode.
The one-line escape
Section titled “The one-line escape”When you are in simple mode and want to run a single SQL statement without switching, prefix the line with a colon:
:select count(*) from booksThat runs just this one line as SQL; you stay in simple mode afterwards.
Seeing the SQL behind a command
Section titled “Seeing the SQL behind a command”Run a simple-mode command while in advanced mode and the playground prints
the equivalent SQL beneath it, tagged Executing SQL:. This is one of the most
useful ways the playground teaches: you write the friendly, readable command,
and immediately see the real SQL statement it stands for — the same statement
you could have typed yourself.
It turns every command into a small SQL lesson. Add a column the easy way and
watch the ALTER TABLE it maps to:
add column to books: title (text)Executing SQL: ALTER TABLE books ADD COLUMN title textThe payoff grows with the command. A single create m:n relationship — the
one-line way to
link two tables many-to-many
— expands to an entire junction table: two foreign-key columns, a compound
primary key, and two cascading foreign keys, all spelled out in the echo.
Because the echo is exactly what runs, it doubles as a recipe: read it, copy it, tweak it, and run your own version in advanced mode.