Re: [sqlite] OK,OK I have an experiment

2011-11-14 Thread Igor Tandetnik
Matt Young  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


[sqlite] OK,OK I have an experiment

2011-11-14 Thread Matt Young
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?
Matt
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users