Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Rules about Updateable Views

Rules about Updateable Views

From: Dino Hsu <dino1_at_ms1.hinet.net>
Date: Sun, 01 Jul 2001 22:57:46 +0800
Message-ID: <5tdujtk4qake24uehfs03at9nmf52k4n14@4ax.com>

Dear all,

In a book, it says about updateable views: 1.There are two types of views: simple and complex. 1-1.Simple views are those that have only one underlying table. 1-2.Complex views are those with two or more underlying tables that have been joined together.
2.Data may be inserted into simple views except in the following cases:
2-1.If the with check option is used, the user may not insert, delete, or update data on the table underlying the simple view if the view itself is not able to select that data for the user. 2-2.The user may not insert, delete, or update data on the table underlying the simple view if the select statement creating the view contains group by, order by, or a single-row operation. 2-3.No data may be inserted in simple views that contain references to any virtual column, such as ROWID, CURRVAL, NEXTVAL, and ROWNUM. 2-4.No data may be inserted into simple views that are created with the read only option.
3.Data may be inserted into complex views when all of the following conditions are true:
3-1.The statement affects only one of the tables in the join. 3-2.For update statements, all columns changed are extracted from a key-preserved table. In addition, if the view is created with the with check option clause, join columns and columns taken from tables that are referenced more thatn once in the view are not part of the update. 3-3.For delete statments, there is only one key-preserved table in the join. This table may be present more than once in the join, unless the view has been created with the with check option clause. 3-4.For insert statements, all columns where values are inserted must come from a key-preserved table, and the view must not have been created with the with check option cluase.

I find this hard to understand, anyone can interpret it? Thanks in advance.

Dino Received on Sun Jul 01 2001 - 09:57:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US