3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing VIEW statements.
14 # $Id: view.test,v 1.39 2008/12/14 14:45:21 danielk1977 Exp $
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
18 # Omit this entire file if the library is not configured with views enabled.
26 CREATE TABLE t1(x, y);
27 INSERT INTO t1 VALUES(1, 2);
28 CREATE VIEW v1 AS SELECT * FROM (
29 WITH x1 AS (SELECT y, x FROM t1)
39 CREATE VIEW v3 AS SELECT * FROM main.t1;
40 WITH t1(a, b) AS ( SELECT 3, 4 ) SELECT * FROM v3;
45 CREATE VIEW v2 AS SELECT * FROM t1;
46 WITH t1(a, b) AS ( SELECT 3, 4 ) SELECT * FROM v2;