The code for v3.sql is: CREATE OR REPLACE VIEW v3 AS SELECT c FROM v2 WHERE c < 20; SELECT * FROM test.v3; INSERT INTO v3(c) VALUES (8); INSERT INTO v3(c) VALUES (30);