当前位置:数据库 > 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
Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,