在oracle中,可以利用“comment on”命令修改表注释,该命令用于给表或字段加以说明,也就是添加注释,语法为“comment on table 表名 is '表的注释信息';”。
本教程操作环境:Windows10系统、Oracle 11g版、Dell G3电脑。
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中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号