oracle 导出表结构信息

直接贴sql:

select cols.table_name 表名, cols.column_name 列名, cols.data_type 字段类型, cols.data_length 长度, cols.nullable 是否为空, cols.data_default 默认值, comm.comments 备注 from user_tab_cols cols
left join user_col_comments comm on cols.table_name = comm.table_name and cols.column_name = comm.column_name
where cols.table_name in (select distinct table_name from user_tab_cols)  and  cols.column_id is not null order by cols.table_name, segment_column_id

导出doc:

posted @ 2018-11-29 16:31  walle1314  阅读(660)  评论(0编辑  收藏  举报