With Java and SQLite, can a View
be created from another View
where the values in the base View
are not equal to a collection of values?
To be precise, the requirement (in pseudo-code) is:
CREATE VIEW B FROM VIEW A WHERE A._ID NOT IN <array of int>
This requirement has come up because VIEW
s cannot be UPDATE
d or DELETE
d officially:
You cannot DELETE, INSERT, or UPDATE a view. Views are read-only in SQLite. However, in many cases you can use an INSTEAD OF trigger on the view to accomplish the same thing. Views are removed with the DROP VIEW command.
Almost certain that an INSTEAD OF
trigger is not the solution, simply because altering the base table that created VIEW A
is not what's needed. Please advice if there's a clever way to meet that requirement.
Guess no need code is needed as part of the question, but an answer with code will be gratefully appreciated.
Thanks a ton in advance!
Aucun commentaire:
Enregistrer un commentaire