SELECT A.TABLE_NAME 表名称,
C.COMMENTS 表注释,
A.COLUMN_NAME 字段名称,
REPLACE(DECODE(A.DATA_TYPE,
‘DATE‘,
‘DATE‘,
‘VARCHAR2‘,
‘VARCHAR2(‘ || A.DATA_LENGTH || ‘)‘,
‘NUMBER‘,
‘NUMBER(‘ || A.DATA_PRECISION || ‘,‘ || A.DATA_SCALE || ‘)‘,
A.DATA_TYPE),
‘,0‘,
‘‘) 字段类型,
b.COMMENTS 注释
FROM USER_TAB_COLUMNS A, USER_COL_COMMENTS B, USER_TAB_COMMENTS C
WHERE A.COLUMN_NAME = B.COLUMN_NAME
AND A.TABLE_NAME = B.TABLE_NAME
AND A.TABLE_NAME = C.TABLE_NAME and A.TABLE_NAME=表名
查看所有表结构的话把红色部分去掉
时间: 2024-10-10 08:49:15