oracle怎么修改表注释

WBOY
WBOY 原创
2022-03-07 16:04:23 4257浏览

在oracle中,可以利用“comment on”命令修改表注释,该命令用于给表或字段加以说明,也就是添加注释,语法为“comment on table 表名 is '表的注释信息';”。

本教程操作环境:Windows10系统、Oracle 11g版、Dell G3电脑。

oracle怎么修改表注释

Oracle中用comment on命令给表或字段加以说明。

用法如下:

1.对表的说明:

comment on table table_name is '对表的说明';

2.对表中列的说明:

comment on column table.column_name is '对表中列的说明';

3.查看表的说明

select * from user_tab_comments where table_name = 'employees';

4.查看表中列的说明

select * from user_col_comments where table_name = 'employees';

5.查看数据库中所有表中列的说明

select * from user_col_comments where comments is not null;

6.删除表级或列级说明,即时将其设置为空

comment on table employees is '';
comment on column employees.salary is '';

推荐教程:《Oracle视频教程

以上就是oracle怎么修改表注释的详细内容,更多请关注php中文网其它相关文章!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。