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

oracle读取表中的所有字段,类型,及注释

2014-04-29 22:46 411 查看
select distinct(t.COLUMN_NAME)【表字段】, t.DATA_TYPE【类型】,a.column_name asp_name,t2.comments【注释】,
'' as cSource,'' as ParamID,'' as ControlType,'' asIsIncreate,'' as cValue
from user_tab_columns t
left join (
select cu.* from user_cons_columns cu,
user_constraints au
where cu.constraint_name = au.constraint_name
and au.constraint_type = 'P' and au.table_name = 'JGS_TDGY') a
on t.COLUMN_NAME = a.COLUMN_NAME left join
USER_COL_COMMENTSt2 on t.COLUMN_NAME=t2.column_name and t.TABLE_NAME=t2.table_name where t.table_name ='JGS_TDGY'【表名】
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: