0

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?

2 Answers 2

1

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);
Sign up to request clarification or add additional context in comments.

Comments

0

This is what you tried; it won't work:

SQL> create schema authorization scott
  2    create table a of xmltype;
  create table a of xmltype
                 *
ERROR at line 2:
ORA-00906: missing left parenthesis

Though, you can create such a table itself:

SQL>   create table a of xmltype;

Table created.

If you want to create a schema and a table, modify create table statement to e.g.

SQL> create schema authorization scott
  2    create table b (col xmltype);

Schema created.

SQL>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.