Creating Oracle table with XMLTYPE column
If you create a table with an XMLTYPE column
create table test (name varchar2(60), xml_col xmltype) ;
You get the following error message
Error starting at line 22 in command:
create table test (name varchar2(60), xml_col xmltype)
Error at Command Line:22 Column:0
Error report:
SQL Error: ORA-43853: SECUREFILE lobs cannot be used in non-ASSM tablespace "TBS_3"
To work around this problem all you need to do is define the Column storage for the XMLTYPE column to b a clob.
SQL> create table test (name varchar2(60), xml_col xmltype not null) xmltype column xml_col store as clob
SQL> insert into test values ('abc', xmltype('World '));
SQL> select name, extractvalue(xml_col, '/hello') value from test3
Name Value
-----------------
Hello World
create table test (name varchar2(60), xml_col xmltype) ;
You get the following error message
Error starting at line 22 in command:
create table test (name varchar2(60), xml_col xmltype)
Error at Command Line:22 Column:0
Error report:
SQL Error: ORA-43853: SECUREFILE lobs cannot be used in non-ASSM tablespace "TBS_3"
To work around this problem all you need to do is define the Column storage for the XMLTYPE column to b a clob.
SQL> create table test (name varchar2(60), xml_col xmltype not null) xmltype column xml_col store as clob
SQL> insert into test values ('abc', xmltype('
SQL> select name, extractvalue(xml_col, '/hello') value from test3
Name Value
-----------------
Hello World
Comments