The code for v1.sql is: CREATE TABLE t1 ( c INT ); CREATE OR REPLACE VIEW v1 AS SELECT c FROM t1 WHERE c > 10; INSERT INTO v1(c) VALUES (5);