ORACLE在表中添加的目光凝视和读取列

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

posted @ 2015-06-06 13:11  zfyouxi  阅读(204)  评论(0)    收藏  举报