Matt Young <youngsan...@gmail.com> wrote:
> I have table1,  I make a view view one of that table.  I then delete the
> table, the view does not work.
> I then recreate the table, and alter its name to the one viewed.
> and view suddenly works.
> Am I dreaming?  Does SQLite3 maintain a schema in views an allow us to
> alter table names?

A view is nothing more than a stored SELECT statement. Basically, when you 
prepare a statement like

select * from ViewName;

it is rewritten as

select * from (select * from UnderlyingTable);

and then the result of such rewriting is parsed and processed as usual.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to