SELECT 'desc '||table_name ||' ;' FROM user_tables
用如下方法可以查出该用户下所有的表: select table_name,table_type from cat;但如何才能查看所有表下的注释呢?
查用户所有的表: select * from all_tables t where t.owner=''; 查表的注释: select * from user_tab_comments t where t.table_name='Y_TEST2'; 查字段的注释: select * from user_col_comments t where t.table_name='Y_TEST2';三者结合起来试试。
select * from user_col_comments;能查出字段的所有注释
select * from user_tab_comments如果你只想看表名和注释的话可以这样select TABLE_NAME,COMMENTS from user_tab_comments给分哦,lz...
select t.table_name,t.comments,c.column_name,c.comments from user_tab_comments t, left join user_col_comments c on t.table_name=c.table_name;
select table_name,table_type from cat;但如何才能查看所有表下的注释呢?
select * from all_tables t where t.owner='';
查表的注释:
select * from user_tab_comments t where t.table_name='Y_TEST2';
查字段的注释:
select * from user_col_comments t where t.table_name='Y_TEST2';三者结合起来试试。
from user_tab_comments t,
left join user_col_comments c
on t.table_name=c.table_name;