SQL> select type_name from user_types;TYPE_NAME
------------------------------
MY_TYPE
T_PERSON2
T_SONSQL> drop type body my_type;
drop type body my_type
*
第 1 行出现错误:
ORA-04043: 对象 MY_TYPE 不存在
SQL> drop type my_type;
drop type my_type
*
第 1 行出现错误:
ORA-02303: 无法使用类型或表的相关性来删除或取代一个类型怎么删不掉啊?可以肯定的是:没有任何表引用该类型。

解决方案 »

  1.   

    type body和type是两个不同的Oracle对象。
      

  2.   

    我是先删除type body,再删除 type,两个没影响的。
      

  3.   

    你DB里只放了一个TYPE:my_type
    却偏要删除TYPY BODY,当然会告诉你object不存在了。
    你就只删除type 就好了,用
    drop type  my_type;
      

  4.   

    不好意思,没看清楚问题
    你用select * from user_types t;看看详细信息吧。
      

  5.   

    drop type my_type force;
      

  6.   

    ORA-02303: cannot drop or replace a type with type or table dependents 
    Cause: An attempt was made to drop or replace a type that has dependents. There could be a substitutable column of a supertype of the type being dropped.
     
    Action: Drop all type(s) and table(s) depending on the type, then retry the operation using the VALIDATE option, or use the FORCE option.
     
      

  7.   

    因为你这个TYPE和其他对象产生了相关性两种办法
    1
    先删除依赖于这个type的那些对象 再删除这个type2
    使用force选项
      

  8.   

    谢谢,
    但还有一点疑问,我可以肯定没有依赖于这个type的对象,为什么不能drop掉,而一个要用force呢?
      

  9.   

    呵呵 
    我给你两个解释1
    ORACLE系统错乱2
    你记错了 其实你不能肯定你选择哪个?
      

  10.   


    如果在其他存储过程或函数里面使用了这个type,一样不能删。