000001  hash-threshold 8
000002  
000003  statement ok
000004  CREATE TABLE t1( x INTEGER, y VARCHAR(8) )
000005  
000006  statement ok
000007  INSERT INTO t1 VALUES(1,'true')
000008  
000009  statement ok
000010  INSERT INTO t1 VALUES(0,'false')
000011  
000012  statement ok
000013  INSERT INTO t1 VALUES(NULL,'NULL')
000014  
000015  statement ok
000016  CREATE INDEX t1i1 ON t1(x)
000017  
000018  
000019  # EVIDENCE-OF: R-27002-52307 The DROP VIEW statement removes a view
000020  # created by the CREATE VIEW statement.
000021  
000022  # EVIDENCE-OF: R-18673-21346 The view to drop is identified by the
000023  # view-name and optional schema-name specified as part of the DROP VIEW
000024  # statement. This reference is resolved using the standard procedure for
000025  # object resolution.
000026  
000027  statement ok
000028  CREATE VIEW view1 AS SELECT x FROM t1 WHERE x>0
000029  
000030  statement ok
000031  DROP VIEW view1
000032  
000033  # already dropped
000034  statement error
000035  DROP VIEW view1
000036  
000037  # never existed
000038  statement error
000039  DROP VIEW viewX
000040  
000041  statement ok
000042  CREATE VIEW view2 AS SELECT x FROM t1 WHERE x=0
000043  
000044  # EVIDENCE-OF: R-00359-41639 The view definition is removed from the
000045  # database schema, but no actual data in the underlying base tables is
000046  # modified.
000047  
000048  query I rowsort label-0
000049  SELECT x FROM view2
000050  ----
000051  0
000052  
000053  statement ok
000054  DROP VIEW view2
000055  
000056  query I rowsort label-0
000057  SELECT x FROM t1 WHERE x=0
000058  ----
000059  0