The concept of a key-preserved table is fundamental to understanding the restrictions on modifying join views. normally an update acts on a single table. to avoid tortuous subqueries in the filter, oracle allows you to update a view (or subquery) as long as it is still able to easily map the changes you are making onto real underlying rows in a. Though i know that cld01 could be the key preserved table. i guess this is logic that oracle chooses cld02 as the key preserved table, as the primary key is on more columns. based on this i could say that the issue appears from the moment i have 3 tables, among which 2 having more than the column numcli in the primary key. but it is just what i. The key preserved table can be repeated in the from clause. if the view is defined with the with check option clause and the key preserved table is repeated, then the rows cannot be deleted from the view. insert rule: an insert statement must not explicitly or implicitly refer to the columns of a non-key-preserved table. if the join view is.
Ora-01779: cannot modify a column which maps to a non-key-preserved table cause you tried to insert or update columns in a join view which map to a non-key-preserved table.. A)key-preservation is a property of the table inside the join view not the table itself independently.a table may be key preseved in one join view and may not be key preserved in another join view. b)it is not necessary for the key columns of a table to be selected in the join view for the table to be key preserved.. The updatable view query must unambiguously return each row of the modified table only one time. the query must be “key preserved”, which means oracle must be able to use a primary key or unique constraint to ensure that each row is only modified once..
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.