为需要导出的修改语句后在sqlplus中执行(执行用户需要有dba权限)
SELECT 取代(wm_concat(关口)& # 39;,& # 39;,& # 39;| | & # 39;),得到; SELECT & # 39; & # 39; & # 39; & # 39; | |, & # 39; & lt;才能& # 39;| | COLUMN_NAME | | & # 39;祝辞& # 39;| | & # 39;& # 39;& # 39;& # 39;| | & # 39;| | & # 39;| | COLUMN_NAME | | & # 39; | | & # 39; | | & # 39; & # 39; & # 39; & # 39; | | & # 39; & lt; & # 39; | | COLUMN_NAME | | & # 39;/祝辞& # 39;| | & # 39;& # 39;& # 39;& # 39; AS cols 得到DBA_COL_COMMENTS WHERE  TABLE_NAME =& # 39;部门# 39;以及所有者=,& # 39;斯科特# 39;),
替换为,修改为,修改后在sqlplus中执行此语句
set colsep ,,, set feedback  off , set heading  off , set trimout 提醒, spool /home/oracle/dept.xml ,, SELECT & # 39; & lt; ? xml version=?.0“, ?比; & lt; ROWDATA> & # 39;| |取代(wm_concat (dept_info) & # 39;, & # 39;, & # 39;, & # 39;) | | & # 39; & lt;/ROWDATA> & # 39; ,, 得到; SELECT & # 39; & lt; ROW> & lt;才能C0> & # 39; | | ROWNUM | | & # 39; & lt;/C0> & # 39; | | & # 39; & lt;才能DEPTNO> & # 39; | | DEPTNO | | & # 39; & lt; DEPTNO/祝辞& # 39;| | & # 39; & lt;才能DNAME> & # 39; | | DNAME | | & # 39; & lt; DNAME/祝辞& # 39;| | & # 39; & lt;才能LOC> & # 39; | | LOC | | & # 39; & lt; LOC/祝辞& # 39; | | & # 39; & lt;/ROW> & # 39;AS dept_info 得到SCOTT.DEPT ); ,, spool off , 退出
,