Create a Reviews Table
Easy · DDL
CREATE TABLE name (column type, ...); makes a new table. Add NOT NULL to a column that must always have a value, and PRIMARY KEY to the column that identifies each row.
Create a table named reviews with these columns, in this order:
- id: serial, primary key
- product_id: integer, required
- rating: integer, required
- body: text, optional
- created_on: date, optional
To check your table, the checker adds one review for every product and then lists your columns (column_name, data_type, is_nullable) with the number of reviews saved.
Next: Busy Categories