Your First Table
easyQuestion 86Create a table called buildings with two columns: id, an INTEGER PRIMARY KEY, and name, a TEXT column that is NOT NULL. A row with no name must be refused, and a row that supplies only a name must be accepted (the key fills itself in).
Expected result
Table buildings ✓ id INTEGER PRIMARY KEY ✓ name TEXT NOT NULL ✓ A building with no name: rejected (NOT NULL) ✓ A building called Turing Hall: accepted
Hints3 available
Sign in to use hintsTopics
CREATE TABLE
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sel, ins, desc)
Results
Run your SQL to see every statement's output here, then how it compares with the expected answer.
Not sure what is in a table? SHOW TABLES lists them and DESCRIBE students shows the columns, or open the database browser under the question.