当前位置:数据库 > Oracle >>

oracle查询表的注释,及列的注释

oracle查询表的注释,及列的注释
 
[sql] 
select t3.table_name,t3.comments,t2.comments,t1.COLUMN_NAME  
       ,t1.DATA_TYPE||'('||decode(t1.DATA_TYPE, '', t1.DATA_PRECISION+t1.DATA_SCALE, t1.data_length)||')'  
from user_tab_cols t1, user_col_comments t2, user_tab_comments t3  
where t1.TABLE_NAME=t2.table_name(+)  
and t1.COLUMN_NAME=t2.column_name(+)  
and t1.TABLE_NAME=t3.table_name(+)  
and lower(t1.TABLE_NAME)='user';  

 

select distinct data_length from dba_tab_cols where data_type ='NUMBER'

 

结果:
22
1
2
3
0
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,