我创建了customer_ty
一个对象,其中包括一个名为“存款”的嵌套表。
CREATE TYPE deposit_ty as object(
depNo number,
depCategory ref depcategory_ty,
amount number,
period number
)
/
此“depCategory”引用另一个名为“depcategory_tbl”的表中的 depcategory_ty。
CREATE TYPE deposit_ntty as table of depcategory_ty
/
CREATE TYPE address_ty as varray(3) of varchar2(20)
/
CREATE TYPE customer_ty as object(
custId varchar2(4),
custName varchar2(10),
address address_ty,
dob date,
deposits deposit_ntty
)
/
CREATE TABLE customer_tbl of customer_ty(
custId primary key)
nested table deposits store as cli_deposit_tbl
/
alter table cli_deposit_tbl
add scope for (depCategory) is depcategory_tbl
/
当我尝试为表添加范围时出现问题。它说;
add scope for (depCategory) is depcategory_tbl
*
ERROR at line 2:
ORA-0094:"DEPCATEGORY":Inavalid Identifier
所有标识符都是正确的。这有什么问题?