Oracle 相关查询整理

1、查询表名及对应表注释内容

select * from user_tab_comments c where c.comments is not null;

2、查询表及对应字段的注释内容(表字段注释)

select * from user_col_comments d where d.table_name ='ORG';

3、查询表,并将表字段的英文转为中文注释显示



相关内容整理:

在ORACLE中给表、列增加注释以及读取注释
1、给表填加注释:SQL>comment on table 表名 is '表注释";
2、给列加注释:SQL>comment on column 表.列 is '列注释';
3、读取表注释:SQL>select * from user_tab_comments where comments is not null;
4、读取列注释:SQL>select * from user_col_commnents where comments is not null and table_name='表名';

附表USER_TAB_COMMENTS和user_col_comments的结构:
1、user_tab_comments由table_name、table_type和comments三部分组成。
2、user_col_comments由table_name、column_name和comments三部分组成。
3、在SQL*PLUS中显示表结构:desc 表名;



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值