1.请把出错代码贴出,方便大家分析.
2.不知道中文的对象视图是不是英文的 Materialized View.关注:

解决方案 »

  1.   

    Object View Example
    The following example creates object view emp_object_view of employee_type: CREATE TYPE employee_type AS OBJECT
      ( empno       NUMBER(4),
        ename       VARCHAR2(20), 
        job         VARCHAR2(9), 
        mgr         NUMBER(4),
        hiredate    DATE, 
        sal         NUMBER(7,2), 
        comm        NUMBER(7,2)  );CREATE OR REPLACE VIEW emp_object_view OF employee_type 
      WITH OBJECT IDENTIFIER (empno)
      AS SELECT empno, ename, job, mgr, hiredate, sal, comm 
         FROM emp; 
      

  2.   

    请参考以下各参数
    OF type_name Use this clause to explicitly creates an object view of type type_name. The columns of an object view correspond to the top-level attributes of type type_name. Each row will contain an object instance and each instance will be associated with an object identifier (OID) as specified in the WITH OBJECT IDENTIFIER clause. If you omit schema, Oracle creates the object view in your own schema. WITH OBJECT IDENTIFIER  The WITH OBJECT IDENTIFIER lets you specify the attributes of the object type that will be used as a key to identify each row in the object view. In most cases these attributes correspond to the primary-key columns of the base table. You must ensure that the attribute list is unique and identifies exactly one row in the view. If you try to dereference or pin a primary key REF that resolves to more than one instance in the object view, Oracle raises an error. 
     
     
     Note: The 8.0 syntax WITH OBJECT OID is replaced with this syntax for clarity. The keywords WITH OBJECT OID are supported for backward compatibility, but Oracle Corporation recommends that you use the new syntax WITH OBJECT IDENTIFIER.   
     
     If the object view is defined on an object table or an object view, you can omit this clause or specify DEFAULT. 
     
     
     DEFAULT 
     Specify DEFAULT if you want Oracle to use the intrinsic object identifier of the underlying object table or object view to uniquely identify each row. 
     
     
     attribute 
     Specify an attribute of the object type from which Oracle should create the object identifier for the object view.