Change the shape, not the facts
ALTER TABLE ADD COLUMN, DROP TABLE IF EXISTS, what the engine cannot do · level 1 of 6
Opening your saved work…
Sign in to save across devices → · Download your guest work before switching accounts.
Change the shape, not the facts · ALTER TABLE ADD COLUMN, DROP TABLE IF EXISTS, what the engine cannot do · level 1 of 6
A column for the manager's name
The shops table needs a manager_name column. Watch the ALTER, run it, and look at what the existing rows hold.
Data: Northshore Coffee. Every run starts from a fresh copy, so nothing you try here is permanent.
Why it works, clause by clause
- ALTER TABLE shops: the table whose shape changes.
- ADD COLUMN manager_name TEXT: the new column and its type. No DEFAULT, so every existing row gets NULL in it.
- Nothing else moves: the eight rows are still there with every other value intact.
From the reading: Change the shape, not the facts, paragraph 1
ALTER TABLE shops
ADD COLUMN manager_name TEXT;Query results
Run it to see the result here.Run it to see the result here.
Practice here is evidence for you and your instructor, never a grade. Grades live in Canvas.