Subject | Re: [IB-Architect] Updatable views |
---|---|
Author | Ivan Prenosil |
Post date | 2001-12-08T17:20:19Z |
> From: Claudio Valderrama C.Right. How did you guess it ? :-)
> > I prefer software that is doing what it is asked to do,
> > rather than such that tries to do me a favor by "anticipating"
> > my needs and trying to "help" me by doing some extra work automatically.
>
> So you don't like MS software?
> :-)
> > (In SQL92, existence of non-updatable _column_ causes that _whole......
> > view_ becomes non-updatable, e.g. CREATE VIEW V AS SELECT 1,ID
> > FROM TAB.
> the view you posted is absolutely non-updatable, at least from IB/FBYou should distinguish read-only _columns_ and read-only _views_.
> perspective.
Try this:
CREATE TABLE TAB(X INTEGER);
CREATE VIEW V(A,B) AS
SELECT X,123 FROM TAB;
INSERT INTO V(A) VALUES(456);
UPDATE V SET A=789;
Both INSERT and UPDATE will succeed in IB/FB!
But in SQL92 it is pretty muddle; if I understood official
interpreter of SQL92 (=Diane) right, in Entry level it is read-only,
but in higher levels it should be updatable.
> > No stones, please :-)Or you can throw me as food to your pets :-)
>
> I have better weapons if you're interested.
Ivan
http://www.volny.cz/iprenosil/interbase