ITPub博客

首页 > IT基础架构 > 网络安全 > Updatable Join Views (181)

Updatable Join Views (181)

原创 网络安全 作者:tsinglee 时间:2007-11-11 20:03:21 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Object Views (182)
请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1892940