Search notes:

SQLite: views

No validity check at creation time

When a view is created, the »executability« of the select statement is not checked.
In the following code snippet, the create view … statement compiles fine, although the selected columns col_one and col_two don't even exist in the base table tq84_tab:
create table tq84_tab (
  col1,
  col2
);

create view tq84_vw as
select
  col_one,
  col_two
from
  tq84_tab;

select * from tq84_vw;
--
-- Error: … no such column: col_one

drop view tq84_vw;
drop table tq84_tab;
Github repository about-sqlite, path: /views/no-validity-check.sql

See also

drop view

Index