导出表结构到Excel ,统一维护,生成代码用
SELECT C.TABLE_NAME,CC.COMMENTS,C.COLUMN_NAME,C.DATA_TYPE, CASE WHEN C.DATA_TYPE='NUMBER' THEN C.DATA_PRECISION ELSE C.CHAR_LENGTH END AS DATA_LENGTH ,C.DATA_SCALE, C.NULLABLE FROM USER_TAB_COLUMNS C LEFT JOIN USER_COL_COMMENTS CC ON CC.TABLE_NAME=C.TABLE_NAME AND CC.COLUMN_NAME=C.COLUMN_NAME WHERE EXISTS (SELECT 1 FROM USER_TABLES T WHERE C.TABLE_NAME=T.TABLE_NAME AND T.TABLE_NAME LIKE 'ELB%') ORDER BY C.TABLE_NAME,c.COLUMN_ID