Some further comments on VIEWs:
A regular (non TEMPORARY) VIEW can reference only tables in the file
where it is stored. SQLite allows qualified names, but the practice
should be avoided because the VIEW won't work if the file is attached
under a different name.
A TEMPORARY VIEW can reference tables in any attached file, and the use
of qualified names is allowed and encouraged (at least by me).
Gerry
---------------------------------------------------------
On 10/28/2014 12:24 AM, Hick Gunter wrote:
Indices, foreign keys, ... all work only within a single DB file, so allowing
a qualifier would suggest functionality that is not present and probably quite
hard to provide.
How would one keep an index residing in one DB file consistent with a table in
a different file if only one of the files is attached?
In these cases, the qualification is implied. NB: IIRC this also applies to
views, but seems not to be prominently documented.
Eg.
CREATE INDEX db.index_name ON [=>db.]table_name ...
CREATE TABLE db.table_name (...) FOREIGN KEY (...) REFERENCES
[=>db.]referenced_table
CREATE TRIGGER db.trigger_name ... ON [=>db.]table_name ...
CREATE VIEW db.view_name AS SELECT ... FROM [=>db.]table_name ...
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users