Oracle 查看所有表结构
with temp as
(select table_name name,
'表' type,
comments comments,
'' tablename,
0 num,
'' nullable
from user_tab_comments
where table_type = 'TABLE'
union all
select ' ' || a.column_name name,
a.data_type || '(' || a.data_length || ')' type,
b.comments comments,
a.table_name tablename,
column_id num,
nullable nullable
from user_tab_columns a, user_col_comments b
where a.table_name = b.table_name
and a.column_name = b.column_name)
select name, type, nullable, comments
from temp t
start with tablename is null
connect by prior t.name = t.tablename
order siblings by num;
posted on 2021-06-09 16:39 lovezj9012 阅读(395) 评论(0) 收藏 举报
浙公网安备 33010602011771号