Search code examples
sqloracleplsqlxmltype

Oracle: Create schema with table of xml type


in the Oracle database I wanted to create a schema with a table of XMLTYPE.

CREATE SCHEMA AUTHORIZATION xmlAdmin
    CREATE TABLE PossibleAnswers OF XMLTYPE;

In return, I get an error of ORA-00906: missing left parenthesis.

Is there any reason why this is not working?


Solution

  • You want to create the schema with a table with a column of type XMLTYPE rather than trying to create an object-derived table from XMLTYPE:

    CREATE SCHEMA AUTHORIZATION xmlAdmin
      CREATE TABLE PossibleAnswers (value XMLTYPE);