drop type result_type 时,
报错ORA-02303: 无法使用类型或表的相关性来删除或取代一个类型
drop type result_type_array 时
报错 对象不存在
CREATE OR REPLACE TYPE "result_type" as object
(
Seg_node VARCHAR2(20),
Seg_name VARCHAR2(200),
Seg_code VARCHAR2(20)
)
CREATE OR REPLACE TYPE "result_type_array" as table of "result_type";
原因:没有大写和双引号的问题,如果没有大写
解决方法:drop type "result_type_array"
drop type "result_type_array"
在不删除使用type表的相关表的情况下,强制删除type,这样相关表里的对应type的列也被删除
drop type t_air force
如果不使用双引号,会默认为大写,使用双引号就是双引号内的名称。
上网查找的原因:
ORA-02303 cannot drop or replace a type with type or table dependent(s)
Cause An attempt was made to drop or replace a type that has dependents.
Action Drop all type(s) and table(s) depending on the type, then retry the operation or use the FORCE option.
Copyright (C) 1998, Oracle Corporation
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14613712/viewspace-616667/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/14613712/viewspace-616667/