oracle create Force View

Force ... Forces The Creation Of A View Even When The View Will Be Invalid. NoForce Is The Default

 

强制建立一个view,即使创建后该view失效

 

SQL> select * from xyz;
 
select * from xyz
 
ORA-00942: 表或视图不存在
 
SQL> 
SQL> CREATE OR REPLACE FORCE VIEW view_force AS
  2  SELECT * FROM xyz;
 
Warning: View created with compilation errors
 
SQL> 
SQL> SELECT OBJECT_NAME, STATUS
  2  FROM USER_OBJECTS
  3  WHERE OBJECT_TYPE = 'VIEW'
  4  AND OBJECT_NAME='VIEW_FORCE';
 
OBJECT_NAME                                                                      STATUS
-------------------------------------------------------------------------------- -------
VIEW_FORCE                                                                       INVALID
 
SQL> 
posted @ 2012-03-14 13:25  DB&*NIX  阅读(2915)  评论(0编辑  收藏  举报