SQLite Forum

DROP VIEW IF EXISTS failure
Login
Perhaps another way to phrase the question: Why do these two DROP statements behave differently?

~~~~~
% ./sqlite3
SQLite version 3.33.0 2020-06-11 16:04:10
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE t1(x);
sqlite> DROP VIEW IF EXISTS v1;
sqlite> DROP VIEW IF EXISTS t1;
Error: use DROP TABLE to delete table t1
sqlite>
~~~~~

Neither VIEW exists, but the behavior is different.  I think the OP expects no error in either case.