---
title: Simple and advanced modes
description: How the playground's two input modes differ, how to switch, and the one-line escape hatch.
sidebar:
  order: 3
---

import Demo from '../../../components/Demo.astro';

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.

<Demo src="/casts/modes.cast" title="The same command in both modes — advanced mode also shows the SQL it runs for you." />

## Simple mode (the default)

Simple mode is a friendly, keyword-based command language designed for
learning. Commands read close to English:

```rdbms
create table authors with pk author_id(serial)
show data authors
```

Simple 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)

Advanced mode accepts standard SQL — `SELECT`, `INSERT`, `CREATE TABLE`, and
more — alongside the same app-level commands:

```sql
select title, published from books where published >= 2000 order by published;
```

Switch modes with the `mode` command:

```rdbms
mode advanced
mode simple
```

The 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

When you are in simple mode and want to run a single SQL statement without
switching, prefix the line with a colon:

```rdbms
:select count(*) from books
```

That runs just this one line as SQL; you stay in simple mode afterwards.

## Seeing the SQL behind a command

When you run a simple-mode command in advanced mode, the playground prints
the equivalent SQL beneath your command. It is a built-in way to learn how
the friendly commands map onto real SQL — the same statements you could type
yourself in advanced mode.
