您的位置:首页 > 数据库 > Oracle

oracle获取表或视图的字段名、数据类型、注释

2016-01-07 15:48 447 查看
select

t1.COLUMN_NAME 字段名,
t1.DATA_TYPE 数据类型,
t2.comments 注释

from

(select t.COLUMN_NAME,t.DATA_TYPE from user_tab_columns t where t.TABLE_NAME=upper('vw_personbaseprint_data')) t1,
(select tt.column_name,tt.comments from user_col_comments tt where tt.table_name=upper('vw_personbaseprint_data')) t2

where t1.COLUMN_NAME=t2.column_name
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息