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: 无法使用类型或表的相关性来删除或取代一个类型怎么删不掉啊?可以肯定的是:没有任何表引用该类型。
却偏要删除TYPY BODY,当然会告诉你object不存在了。
你就只删除type 就好了,用
drop type my_type;
你用select * from user_types t;看看详细信息吧。
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.
1
先删除依赖于这个type的那些对象 再删除这个type2
使用force选项
但还有一点疑问,我可以肯定没有依赖于这个type的对象,为什么不能drop掉,而一个要用force呢?
我给你两个解释1
ORACLE系统错乱2
你记错了 其实你不能肯定你选择哪个?
如果在其他存储过程或函数里面使用了这个type,一样不能删。