Database 需要有关Oracle 10g express edition的帮助吗

Database 需要有关Oracle 10g express edition的帮助吗,database,oracle,oracle-xe,oracle-type,Database,Oracle,Oracle Xe,Oracle Type,当我试图在下表中插入一条记录时,出现错误“ora-03001:未实现的特性”。我找了一晚上,还是没找到。我正在使用Oracle10g express edition 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 va

当我试图在下表中插入一条记录时,出现错误“ora-03001:未实现的特性”。我找了一晚上,还是没找到。我正在使用Oracle10g express edition

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>
这适用于传递多个标量值或单个类型


它不适用的一种情况是使用记录类型在PL/SQL中插入。这与你的情况无关,但我提到它是为了完整

插入一个记录变量看起来像这样

declare
    r23 t23%rowtype;  -- record declaration
begin
    r23.id := 1;
    r23.created := sysdate;
    -- insert using record variable
    insert into t23
    values r23; 
end;

既然可以轻松下载完整版,为什么还要使用expression edition?我对这方面还不太熟悉,我认为expression edition是免费的。出于自我教育的目的,完整版是免费的。该许可证应用于商业用途。使用XE与本例中的错误无关。谢谢您的回答。我是Oracle数据库方面的新手。我通常使用phpMyAdmin和mySQL.+1来获取有关插入记录的信息。总是很难找到关于它的信息,因为它没有很好的记录