SQLzoo.net

Add a constraint to a table.

Postgres
We can add a constraint
  • a foreign key reference
  • a UNIQUE requirement
  • a CHECK constraint
This is in the SQL standard ALTER TABLE
Execute tidy up code silently
Execute set up code


Specific to Postgres
ALTER TABLE

Related links:

  • CREATE, DROP and ALTER