sqloracle-databasexmltype

Add column in Oracle table


I'm trying to add an XMLType column into a table, but it returns an error. Why?

This is the query:

alter table TEST_ID add column xml_column xmltype;

It returns the error:

[SQL] alter table TEST_ID add column xml_column xmltype
[Err] ORA-00904: : invalid identifier

Solution

  • You don't need the "column" word in there, so it's:

    ALTER TABLE test_id ADD xml_column xmltype;