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
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。