Hi, create an after delete trigger with IF (SELECT 1 FROM t1 limit 1) is null THEN RAISE EXCEPTION 'Must keep at least 1 row'; .... hth Thomas -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general