需要有关Oracle 10g express版的帮助

当我尝试在下面的表格中插入记录时,我收到错误“ora-03001:未实现的功能”。我整晚都在搜索,但仍然没有运气。我正在使用Oracle10g快递版。
create or replace type MajorsType As varray(20) of varchar2(10);

create or replace type studenttype as object (
stuID varchar2(5),
lastName varchar2(15),
firstName varchar2(12),
majors MajorsType)
INSTANTIABLE
NOT FINAL;

create table Student of StudentType (
constraint student_stuID_pk PRIMARY KEY(stuID));

INSERT INTO student values StudentType ('S999', 'Smith', 'John', MajorsType('Math', 'Accounting'));
    
已邀请:
这是一个简单的语法错误:VALUES子句要求所有内容都包含在括号中:
SQL> INSERT INTO student
  2  values ( StudentType ('S999', 'Smith', 'John', MajorsType('Math', 'Accounting')))
  3  /

1 row created.

SQL>
无论我们传递多个标量值还是单个类型,这都适用。 不适用的一种情况是使用RECORD类型在PL / SQL中插入。这与你的情况无关,但我提到它是完整的。 插入RECORD变量看起来像这样
declare
    r23 t23%rowtype;  -- record declaration
begin
    r23.id := 1;
    r23.created := sysdate;
    -- insert using record variable
    insert into t23
    values r23; 
end;
    

要回复问题请先登录注册