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 02
PRIMARY KEY identifies a row. In PostgreSQL, GENERATED BY DEFAULT AS IDENTITY supplies ids. After creating the table, insert one row with title only (no id).
Small example:
CREATE TABLE books ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, title TEXT NOT NULL ); INSERT INTO books (title) VALUES ('Demo');
The database starts empty. Grading checks the schema/data you create across variants.
Expected verify columns: column_name, title · row order is checked
Expected final state (displayed data):
Loading…PRIMARY KEY identifies a row. In PostgreSQL, GENERATED BY DEFAULT AS IDENTITY supplies ids. After creating the table, insert one row with title only (no id).
QUERY STANDBY
›