我的作业有问题。我有以下类型定义:
-- Type definitions
CREATE OR REPLACE TYPE languages_table_t AS TABLE of VARCHAR2(20);
/
CREATE OR REPLACE TYPE phones_table_t AS TABLE of NUMBER;
/
CREATE OR REPLACE TYPE tourist_t AS OBJECT (
-- ...
-- some simple attrubutes
-- one attribute of user defined type
-- more simple attrubutes
-- ...
) NOT FINAL;
/
CREATE OR REPLACE TYPE guide_t UNDER tourist_t (
languages languages_table_t,
phones phones_table_t
);
/
-- All types are created successfully
-- table definitions:
CREATE TABLE Tourist OF tourist_t (
-- all simple attributes with nullity constraints
CONSTRAINT PK_TOURIST PRIMARY KEY (username),
) NESTED TABLE the_UDT_attr STORE AS the_user_defined_type;
-- Created successfully
CREATE TABLE Guide OF guide_t (
CONSTRAINT PK_GUIDE PRIMARY KEY (username)
) NESTED TABLE languages STORE AS guide_languages
NESTED TABLE phones STORE AS guide_phones;
-- returns mystic error
运行最后一条创建指令时,出现以下错误:
CREATE TABLE Guide OF guide_t (
*
ERROR at line 1:
ORA-22913: must specify table name for nested table column or attribute
我已经搜索过这个错误,但它似乎对我的定义过于具体,我找不到解决方法。请,任何帮助将不胜感激。我需要一个关于如何攻击这些错误、如何解决它们或在哪里阅读它的想法。
sqlplus的版本是:
SQL> SELECT * FROM V$VERSION;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
如果您需要任何其他信息来帮助我,请询问,我会更新问题。
谢谢!