参考自:
Sys.XMLType vs. XMLType Datatypes (文档 ID 279843.1)
@H_502_15@
PURPOSE@H_502_15@ -------@H_502_15@@H_502_15@ This article explains the difference between sys.xmltype and xmltype datatypes.@H_502_15@@H_502_15@@H_502_15@ SCOPE & APPLICATION@H_502_15@ -------------------@H_502_15@@H_502_15@ This article is written for XML developers and Oracle DBAs.@H_502_15@@H_502_15@@H_502_15@ SYS.XMLType vs. XMLType Datatypes@H_502_15@ ----------------------------------@H_502_15@@H_502_15@ When creating a table with an XMLTYPE column,you can create the column as XMLTYPE or as SYS.XMLTYPE@H_502_15@@H_502_15@ A subsequent DESC on the table will show the column as either XMLTYPE or SYS.XMLTYPE@H_502_15@@H_502_15@ What is the difference,and when should SYS/XMLTYPE be used and when should XMLTYPE be used ?@H_502_15@@H_502_15@ There is only one type by the name of '%XMLTYPE%' within the database,for example:@H_502_15@@H_502_15@ SELECT TYPE_NAME,OWNER FROM DBA_TYPES WHERE TYPE_NAME LIKE '%XMLTYPE';@H_502_15@@H_502_15@ TYPE_NAME OWNER@H_502_15@ ------------------------------ --------@H_502_15@ XMLTYPE SYS@H_502_15@@H_502_15@ XMLTYPE is a synonym for SYS.XMLTYPE,as shown below :-@H_502_15@@H_502_15@ SELECT SYNONYM_NAME,OWNER FROM DBA_SYNONYMS WHERE SYNONYM_NAME LIKE '%XMLTYPE%';@H_502_15@@H_502_15@ SYNONYM_NAME OWNER@H_502_15@ ------------------------------ ------------------------------@H_502_15@ XMLTYPE PUBLIC @H_502_15@@H_502_15@ In summary,you may use SYS.XMLTYPE or XMLTYPE in a table column definition.@H_502_15@@H_502_15@ There is however an exception to the rule in Oracle 9.2,when attempting to use sqlLoader to load an XMLTYPE column,due to Abstract: sql*LOADER-418 WHILE LOADING XMLTYPE COLUMN BASED ON XMLTYPE SYNONYM (currently not published)@H_502_15@ Workaround:@H_502_15@ use only sys.xmltype to create xmltype column/table@H_502_15@ create table po5(po sys.xmltype);@H_502_15@ Fixed In Ver: 10.0.0 @H_502_15@@H_502_15@ RELATED DOCUMENTS@H_502_15@ -----------------@H_502_15@@H_502_15@ Oracle XML Database online documentation@H_502_15@@H_502_15@