查询表名称,表备注,表字段,字段备注,字段序号,字段类型,字段长度
select t2.TABLE_NAME, t4.COMMENTS, t2.column_name, t3.COMMENTS, t2.column_id, t2.data_type, t2.data_length from ( select t1.TABLE_NAME, t1.COLUMN_NAME, t1.DATA_TYPE, t1.DATA_LENGTH, COLUMN_ID from user_tab_columns t1 where t1.TABLE_NAME like ('BK%')) t2 left join user_col_comments t3 on t2.COLUMN_NAME = t3.COLUMN_NAME and t2.table_name=t3.TABLE_NAME left join user_tab_comments t4 on t4.TABLE_NAME= t2.table_name order by t2.table_name, t2.COLUMN_ID