oracle没法在建表时增加注释,只能在建表后增加,增加后的注释通过user_tab_comments和user_col_comments进行查询。
--添加表注释
comment on table tbl_name is '表名管理';
--添加列注释
comment on column tbl_name.table_name is '表名';
comment on column tbl_name.comments is '表名中文注释';
--删除表注释
comment on table tbl_name is '';
--删除列注释
comment on column tbl_name.table_name is '';
comment on column tbl_name.comments is '';
--查询表注释
select * from user_tab_comments;
select * from dba_tab_comments;
select * from all_tab_comments;
--查询列注释
select * from user_col_comments;
select * from dba_col_comments;
select * from all_col_comments;