Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
SQL / POSTGRESQL / Learn / LESSON 07
ALTER TABLE adds columns or constraints to an existing table. products already has id and name — add price NUMERIC(10,2) NOT NULL DEFAULT 0.
Small example:
ALTER TABLE products ADD COLUMN price NUMERIC(10,2) NOT NULL DEFAULT 0;
Starting tables for this task. Grading checks final state on other datasets too.
| id | name |
|---|---|
| 1 | Desk |
| 2 | Chair |
Expected verify columns: column_name · row order is checked
Expected final state (displayed data):
Loading…ALTER TABLE adds columns or constraints to an existing table. products already has id and name — add price NUMERIC(10,2) NOT NULL DEFAULT 0.
QUERY STANDBY
›