如何在超类表中定义子类型列的范围?

时间:2017-01-02 12:16:40

标签: oracle

我使用一个超类型表包含超类型和子类型的所有数据。但我不知道如何为子类型定义参考列的范围。

示例:

CREATE TABLE person OF personobj (id PRIMARY KEY,
major SCOPE IS department, 
advisor SCOPE IS professor) 
OBJECT IDENTIFIER IS PRIMARY KEY 
NESTED TABLE kidNames STORE AS student_kidnames, 
NESTED TABLE hastaken STORE AS student_hastaken;

我想定义这样的范围:

CREATE TABLE student OF studentobj (id PRIMARY KEY,
major SCOPE IS department, 
advisor SCOPE IS professor) 
OBJECT IDENTIFIER IS PRIMARY KEY 
NESTED TABLE kidNames STORE AS student_kidnames, 
NESTED TABLE hastaken STORE AS student_hastaken;

但它返回错误ORA-00904:“MAJOR”:标识符无效。

如何描述超类型表中子类型的引用列的范围? 表部门和教授被创建了。

更多信息:

$

以上命令成功。

感谢您提供任何信息。

0 个答案:

没有答案