1.获取表信息的代码
--表导出 SELECT A.OWNER ,A.OBJECT_NAME ,B.COMMENTS FROM ALL_OBJECTS A ,ALL_TAB_COMMENTS B WHERE A.OBJECT_TYPE = 'TABLE' AND A.OBJECT_NAME = B.TABLE_NAME ORDER BY A.OWNER, A.OBJECT_NAME ;
--字段导出 SELECT A.OWNER ,A.OBJECT_NAME ,B.COLUMN_NAME ,B.DATA_TYPE ,B.DATA_LENGTH ,B.DATA_PRECISION ,B.DATA_SCALE ,C.COMMENTS ,B.NULLABLE ,B.DATA_DEFAULT FROM ALL_OBJECTS A ,ALL_TAB_COLUMNS B ,ALL_COL_COMMENTS C WHERE A.OBJECT_TYPE = 'TABLE' AND A.OBJECT_NAME = B.TABLE_NAME AND A.OBJECT_NAME = C.TABLE_NAME AND B.COLUMN_NAME = C.COLUMN_NAME ORDER BY A.OWNER, A.OBJECT_NAME ;
2.导出查询内容
pl/sql中选择按钮'Export Qurey Results'进行导出。