Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Multivalue fields

CREATE TABLE grades (
  student TEXT,
  subjects TEXT,
  grades  TEXT
);

INSERT INTO grades (student, subjects, grades) VALUES ('Joe', 'Math,Chemistry,Programming', '27,89,32');
INSERT INTO grades (student, subjects, grades) VALUES ('Jane', 'Math,Literature,Physics', '99,100,97');

SELECT * FROM grades;
$ sqlite < examples/multivalue-fields.sql
Joe|Math,Chemistry,Programming|27,89,32
Jane|Math,Literature,Physics|99,100,97
╭─────────┬────────────────────────────┬───────────╮
│ student │          subjects          │  grades   │
╞═════════╪════════════════════════════╪═══════════╡
│ Joe     │ Math,Chemistry,Programming │ 27,89,32  │
│ Jane    │ Math,Literature,Physics    │ 99,100,97 │
╰─────────┴────────────────────────────┴───────────╯