The code for v2.sql is: CREATE OR REPLACE VIEW v2 AS SELECT c FROM v1 WITH CASCADED CHECK OPTION; INSERT INTO v2(c) VALUES (5);