0
点赞
收藏
分享

微信扫一扫

oracle表列注释内容的添加

文档课题:oracle表列注释内容的添加.
数据库:oracle 11.2.0.4
1、测试过程
SYS@orcl> create table warningrecord (RecordID varchar(36) primary key not null);

Table created.

SYS@orcl> comment on column warningrecord.RecordID is '告警编号';

Comment created.

SYS@orcl> desc warningrecord
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 RECORDID                                  NOT NULL VARCHAR2(36)

SYS@orcl> select * from warningrecord;

no rows selected

SYS@orcl> col comments for a25
SYS@orcl> set line 200
SYS@orcl> select * from user_tab_comments where table_name='WARNINGRECORD';

TABLE_NAME                     TABLE_TYPE  COMMENTS
------------------------------ ----------- -------------------------
WARNINGRECORD                  TABLE

SYS@orcl> select * from user_col_comments where table_name='WARNINGRECORD';

TABLE_NAME                     COLUMN_NAME                    COMMENTS
------------------------------ ------------------------------ -------------------------
WARNINGRECORD                  RECORDID                       告警编号
PL/SQL查询如下:
SQL> desc warningrecord
Name     Type         Nullable Default Comments 
-------- ------------ -------- ------- -------- 
RECORDID VARCHAR2(36)                  告警编号

参考文档:https://www.qycn.com/xzx/article/13635.html

举报

相关推荐

0 条评论