Your first project
This is the shortest possible tour: create a table, put a row in it, and look at the result. Everything here is in simple mode, which is how the playground starts.
When you launch rdbms-playground with no arguments, it opens a fresh
temporary project for you. Type commands into the input field at the bottom
and press Enter to run them. As you type, the field completes
commands with Tab and flags mistakes before you run — see
The assistive editor.
Create a table
Section titled “Create a table”The quickest way to make a table is with pk on its own, which gives you a
ready-made primary key column called id:
create table authors with pkYou never fill id in yourself — the database assigns it as you add rows.
(You can also name and type the key yourself; see the
Tables reference.)
Add a couple of columns
Section titled “Add a couple of columns”In simple mode you create a table with its key, then add the other columns one at a time:
add column to authors: name (text)add column to authors: birth_year (int)Add a row
Section titled “Add a row”insert adds a row. List the columns you are supplying — id fills itself
in automatically:
insert into authors (name, birth_year) values ('Ada Lovelace', 1815)The playground shows the row it just inserted, including the generated id.
Look at the data
Section titled “Look at the data”show data authorsThat is the whole loop: create → add columns → insert → show. From here:
- Build the full example database in Build the library.
- Learn how simple and advanced modes differ.
- Let the editor help you: completion, highlighting, and live error flags.
- Look up any command in the Reference.