constraint

ON DELETE NO ACTION

Checks referential integrity at the constraint check time; a deferred constraint may be repaired before commit. Target: PostgreSQL 17; focused syntax.

Formal Syntax & Structure

sql syntaxsql
REFERENCES parent(id) ON DELETE NO ACTION

Working Example

Example Snippetsql
CREATE TABLE parent(id INT PRIMARY KEY NOT NULL); CREATE TABLE child(parent_id INT DEFAULT 0 REFERENCES parent(id) ON DELETE NO ACTION); INSERT INTO parent VALUES (0),(1); INSERT INTO child VALUES (1);DELETE FROM parent WHERE id=1;
SQL Reference