您的位置:首页 > 数据库 > Oracle

oracle 增加注释

2015-10-15 13:25 489 查看
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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  数据库 sql oracle