Oracle XML Tables
Version 10.2
 
General
Source {ORACLE_HOME}/rdbms/admin/dbmsxmlt.sql
Dependencies source$
tab$
type$

DBA

ALL

USER

dba_tables all_tables user_tables
dba_tab_column all_tab_column user_tab_column
dba_xml_tables all_xml_tables user_xml_tables

XMLType

 
Create
Simple XML Table CREATE TABLE <table_name> (
<column_name> <data type and precision>,
<column_name> <data type and precision>,
CONSTRAINT <constraint_name>
PRIMARY KEY (<primary key constraint columns>))
ORGANIZATION INDEX;
CREATE TABLE xml_lob_tab OF XMLTYPE;

desc xml_lob_tab

SELECT table_name, storage_type
FROM user_xml_tables;

col data_type format a30

SELECT column_name, data_type
FROM user_tab_columns
WHERE table_name = 'XML_LOB_TAB';

set linesize 121

SELECT owner, typecode, attributes, methods, instantiable
from all_types
WHERE type_name = 'XMLTYPE';

SELECT text
FROM all_source
WHERE name = 'XMLTYPE'
ORDER BY line;
Simple XML Table CREATE TABLE <table_name> (
CREATE TABLE xwarehouses OF XMLTYPE
XMLSCHEMA "http://www.oracle.com/xwarehouses.xsd"
ELEMENT "Warehouse";

CREATE TABLE xsample OF XMLTYPE
XMLSCHEMA "http://www.w3schools.com/xml/cd_catalog.xml"
ELEMENT "Sample";
 
Alter
Change Storage ALTER TABLE <table_name>
MODIFY LOB (<lob_name>)
(STORAGE (<storage_parameter>
ALTER TABLE xml_lob_tab
MODIFY LOB (XMLDATA)
(STORAGE (BUFFER_POOL DEFAULT) CACHE);
 
Drop
Drop XML Table DROP TABLE <table_name>;
DROP TABLE xml_lob_tab PURGE;
 
Related Topics
DBMS_XMLGEN
XML Functions
Tables
XMLQuery
XMLTable
 
Contact Us Legal Notices and Terms of UsePrivacy Statement
Hosted by www.Geocities.ws

1