comment 命令可以为表和列添加相应的注释,使表更具有可读性!

 

1.给表添加注释

comment on table scott.DW_RLW_USER_ACTION  is '用户日汇总';

2.删除表的注释

select 'comment on table '||owner||'.'||t.table_name||' is '''';' from dba_tab_comments t where table_name='DW_RLW_USER_ACTION;

 

3.添加列的注释
comment on column scott.DW_RLW_USER_ACTION_DT.SUM_DATE is '产生日期';

4.删除列的注释

select 'comment on column '||owner||'.'||t.table_name||'.'||t.column_name||' is '''';' from dba_col_comments t where table_name='DW_RLW_USER_ACTION;