Home  >  Article  >  Database  >  oracle 查看表 字段明细 注释

oracle 查看表 字段明细 注释

WBOY
WBOYOriginal
2016-06-07 15:19:221622browse

查询表字段明细 select column_name,data_type,data_length,DATA_PRECISION ,DATA_SCALE from all_tab_columns where table_name='tablename' 字段注释 select * from user_col_comments; 表注释 select * from user_tab_comments; 表明细 表注释 字段明细

查询表字段明细

select column_name,data_type,data_length,DATA_PRECISION ,DATA_SCALE 
from all_tab_columns where table_name='tablename'

字段注释

select    from   user_col_comments;

表注释

select    from   user_tab_comments;

表明细+表注释+字段明细+字段注释

select ATC.OWNER,atC.TABLE_NAME,utc.comments,ATC.COLUMN_NAME,ATC.DATA_TYPE,ATC.DATA_LENGTH,ATC.NULLABLE, ucc.comments from

(select ATC.OWNER,atC.TABLE_NAME,ATC.COLUMN_NAME,ATC.DATA_TYPE,ATC.DATA_LENGTH,ATC.NULLABLE
from all_tab_columns ATC where ATC.owner in (
用戶名1,用戶名2........) ) atc

left outer join user_col_comments ucc on atc.table_name=ucc.table_name and atc.column_name=ucc.column_name

left outer join user_tab_comments utc on atc.table_name=utc.table_name

order by atc.table_name,atc.column_name;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn