Views and Base Tables【每日一译】--2013-1-11
2013-02-17 16:03
483 查看
An attempt to use an invalid view automatically causes Oracle to recompile the view
dynamically. After replacing the view, the view might be valid or invalid, depending
on the following conditions:
自动尝试使用无效的视图促使O去动态编译视图。当替换视图后,视图有可能有效
或者无效,取决于以下几个条件:
■ All base tables referenced by the defining query of a view must exist. If a base
table of a view is renamed or dropped, the view is invalidated and cannot be used.
References to invalid views cause the referencing statement to fail. The view can
be compiled only if the base table is renamed to its original name or the base table
is re-created.
#所有与视图定义查询的基表必须存在。如果基表或者视图换名或者DROP,视图将
变得无效并且不能被使用。与无效视图相关的将导致相关语句失败。视图可以被编译
仅当基表被重命名回原来的名字或者基表被重新创建。
■ If a base table is altered or re-created with the same columns, but the datatype of
one or more columns in the base table is changed, then most dependent views can
be recompiled successfully.
#如果基表被修改或者重新创建使用相同的列,但一列或多列在数据类型在基表中被
修改,那么多数依赖视图可以被成功的编译。
■ If a base table of a view is altered or re-created with at least the same set of
columns, then the view can be validated. The view cannot be validated if the base
table is re-created with new columns and the view references columns no longer
contained in the re-created table. The latter point is especially relevant in the case
of views defined with a SELECT * FROM table query, because the defining
query is expanded at view creation time and permanently stored in the data
dictionary.
#如果视图基表被修改或者重建包含至少原来的所有列,那么视图将是有效的。当基表
在重建后包含新列并且与视图相关的列不在包含在新建的基表中,那么视图将是无效的。
后面那一点尤为相关在视图定义使用SELECT * FROM TABLE查询,因为定义查询在视
图创建时已经自动扩展并且永久存储在数据字典中。
dynamically. After replacing the view, the view might be valid or invalid, depending
on the following conditions:
自动尝试使用无效的视图促使O去动态编译视图。当替换视图后,视图有可能有效
或者无效,取决于以下几个条件:
■ All base tables referenced by the defining query of a view must exist. If a base
table of a view is renamed or dropped, the view is invalidated and cannot be used.
References to invalid views cause the referencing statement to fail. The view can
be compiled only if the base table is renamed to its original name or the base table
is re-created.
#所有与视图定义查询的基表必须存在。如果基表或者视图换名或者DROP,视图将
变得无效并且不能被使用。与无效视图相关的将导致相关语句失败。视图可以被编译
仅当基表被重命名回原来的名字或者基表被重新创建。
■ If a base table is altered or re-created with the same columns, but the datatype of
one or more columns in the base table is changed, then most dependent views can
be recompiled successfully.
#如果基表被修改或者重新创建使用相同的列,但一列或多列在数据类型在基表中被
修改,那么多数依赖视图可以被成功的编译。
■ If a base table of a view is altered or re-created with at least the same set of
columns, then the view can be validated. The view cannot be validated if the base
table is re-created with new columns and the view references columns no longer
contained in the re-created table. The latter point is especially relevant in the case
of views defined with a SELECT * FROM table query, because the defining
query is expanded at view creation time and permanently stored in the data
dictionary.
#如果视图基表被修改或者重建包含至少原来的所有列,那么视图将是有效的。当基表
在重建后包含新列并且与视图相关的列不在包含在新建的基表中,那么视图将是无效的。
后面那一点尤为相关在视图定义使用SELECT * FROM TABLE查询,因为定义查询在视
图创建时已经自动扩展并且永久存储在数据字典中。
相关文章推荐
- 查询Sybase ASE 对象如 tables, views, indexes, procedures, triggers, schemas, and users.
- The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
- Objects: Tables, Views and others
- Which three statements are correct about temporary tables? (Choose three.) A. Indexes and views can
- Objects: Tables, Views and others
- Objects: Tables, Views and others
- 学习:SQL Server 2005 System Tables and Views(转)
- for pooled tables,cluster tables,and projection views,join is not allowed:"KONV"
- Compilation of Views and PL/SQL Program Units【每日一译】--2013-1-10
- System catalog tables and views
- Creating and Updating Tables and Views
- 项目管理实践【三】每日构建【Daily Build Using CruiseControl.NET and MSBuild】
- Statement Execution and Transaction Control【每日一译】--2012-11-04
- [每日练习] write a function to find the key in a m*n matrix, where each line and column is incremental
- The difference between Asp.Webpart and WSS.Webpart baseclass
- password encryption and decryption with Base 64
- android-Animating Views Using Scenes and Transitions
- WWDC 2012 Session笔记——219 Advanced Collection Views and Building Custom Layouts
- Android Studio下导入jar包(以andbase.jar为例)
- Android开发框架AndBase