1 2 3 4 5 6 7 8 9 10 11 12 13
| SELECT tt.column_name 代码, tt.data_type 数据类型, tt.data_length 数据长度, tt.nullable 是否为空, tt.data_default 默认值, t.comments 备注 FROM (select * from dba_col_comments where Table_Name = '表名' AND OWNER = '数据库用户名') t, (SELECT a.column_name, a.data_type, a.data_length, a.nullable, a.data_default FROM dba_tab_columns a WHERE a.Table_Name = '表名' AND OWNER = '数据库用户名' ORDER BY a.column_id) tt WHERE t.column_name = tt.column_name;
|