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
Run the tidy code silently
Run set up code


Specific to Postgres
ALTER TABLE

Related links:

  • CREATE, DROP and ALTER