码迷,mamicode.com
首页 > 数据库 > 详细

ORACLE中给表、列增加注释以及读取注释

时间:2014-09-28 13:26:02      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:des   on   c   r   sql   type   oracle   table   rom   

在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 表名;

ORACLE中给表、列增加注释以及读取注释

标签:des   on   c   r   sql   type   oracle   table   rom   

原文地址:http://blog.csdn.net/evan_treborn/article/details/39639259

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!