The kits table is ready but empty. Add two records with explicit identifiers and piece counts. Naming the destination columns makes it clear how each tuple maps to the table, even if the table later gains another column.
These tables are already loaded at the start of this lesson.
kitsOne row represents one tool-kit record.
| Field / SQL type | Meaning | Rules |
|---|---|---|
kit_id · integer | Identifier of the kit record. | Primary key. Required; cannot be NULL. |
name · text | Kit display name. | Required; cannot be NULL. |
pieces · integer | Whole-number count of pieces in this kit. | Required; cannot be NULL. Default 1 when omitted. Check: pieces > 0. |
The setup below is already loaded before each attempt. It is reference material, not code to paste into script.sql.
CREATE TABLE kits (kit_id integer PRIMARY KEY, name text NOT NULL, pieces integer NOT NULL DEFAULT 1 CHECK (pieces > 0));
Edit script.sql, use Run to inspect the result, then Submit.
| kit_id | name | pieces |
|---|---|---|
| 10 | Mending | 4 |
| 20 | Sketching | 6 |
Each VALUES tuple must follow the order of the listed columns.