Gunakan SETEL KONSTRAIN perintah:
Anda juga dapat menemukannya dalam dokumentasi referensi (misalnya) BUAT TABEL
[ CONSTRAINT constraint_name ]
{ NOT NULL |
NULL |
CHECK ( expression ) [ NO INHERIT ] |
DEFAULT default_expr |
GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ] |
UNIQUE index_parameters |
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
Batasannya dapat berupa:
- Awalnya DITangguhkan | SEGERA AWAL
- DAPAT DITUNDA | TIDAK DAPAT DITUNDA