How to modify the storage properties of XMLTYPE type?

    Few days ago, I told one of my friends that the XMLTYPE column equals to CLOB type, this is not true, it's an object type. Today he ask me how to modify the cache property of XMLTYPE column, I just have a very unclear image of this data type, the first thing I did was describe the XMLTYPE object:

SQL> DESC XMLTYPE

METHOD
------
STATIC FUNCTION CREATEXML RETURNS XMLTYPE
Argument Name    Type    In/Out Default?
---------------- ------- ------ --------
XMLDATA          CLOB    IN

......

    I found that almost every member functions has a parameter called "XMLDATA", then I make suggestion to treat the "column.XMLDATA" as a CLOB object. Later I test it in a test database, found that my suggestion is absolutely correct.

SQL> create table t_xmltype (col1 xmltype);

Table created.

SQL> ALTER TABLE T_XMLTYPE MODIFY LOB (COL1.XMLDATA) (CACHE);

Table altered.

    Then I told he to read more books, which will enable people find out the final solution.

Post a comment

SCode:
Mail(*, but will not be displayed):
Home: