Skip Headers

Oracle® Database SQL Reference
10g Release 1 (10.1)

Part Number B10759-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

XMLDATA

Oracle stores XMLType data either in LOB or object-relational columns, based on XMLSchema information and how you specify the storage clause. The XMLDATA pseudocolumn lets you access the underlying LOB or object relational column to specify additional storage clause parameters, constraints, indexes, and so forth.


Example

The following statements illustrate the use of this pseudocolumn. Suppose you create a simple table of XMLType:

CREATE TABLE xml_lob_tab of XMLTYPE;

The default storage is in a CLOB column. To change the storage characteristics of the underlying LOB column, you can use the following statement:

ALTER TABLE xml_lob_tab MODIFY LOB (XMLDATA)
   (STORAGE (BUFFER_POOL DEFAULT) CACHE);

Now suppose you have created an XMLSchema-based table like the xwarehouses table created in "Using XML in SQL Statements ". You could then use the XMLDATA column to set the properties of the underlying columns, as shown in the following statement:

ALTER TABLE xwarehouses ADD (UNIQUE(XMLDATA."WarehouseId"));