Updatable Join Views (181)

本文介绍了连接视图和可更新连接视图的概念,详细解释了可更新连接视图的定义及其特性,并提供了如何判断视图是否可更新的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

A join view is defined as a view that has more than one table or view in its FROM
clause (a join) and that does not use any of these clauses: DISTINCT, aggregation,
GROUP BY, START WITH, CONNECT BY, ROWNUM, and set operations (UNION ALL,
INTERSECT, and so on).

An updatable join view is a join view that involves two or more base tables or views,
where UPDATE, INSERT, and DELETE operations are permitted. The data dictionary
views ALL_UPDATABLE_COLUMNS, DBA_UPDATABLE_COLUMNS, and USER_UPDATABLE_COLUMNS
contain information that indicates which of the view columns
are updatable. In order to be inherently updatable, a view cannot contain any of the
following constructs:

■ A set operator
■ A DISTINCT operator
■ An aggregate or analytic function
■ A GROUP BY, ORDER BY, CONNECT BY, or START WITH clause
■ A collection expression in a SELECT list
■ A subquery in a SELECT list
■ Joins (with some exceptions)
Views that are not updatable can be modified using INSTEAD OF triggers.

可更新的连接视图
1. 连接视图指在一个视图的定义查询的 FROM 字句中引用了多个表或视图 ,且查询中没有使用以下子句:DISTINCT,聚合函数等.
2. 可更新连接视图是指涉及到两张或以上的表进行DML操作是被允许的
3. 从ALL_UPDATABLE_COLUMNS, DBA_UPDATABLE_COLUMNS等字典视图中可查询出哪些视图列是可被更新的
4. 包含以下运算结构的视图不能更新 :set , disitnct 等
5. 对于不可更新的视图,可以利用 INSTEAD OF 触发器对其数据进行修改

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-981772/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10599713/viewspace-981772/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值