oracle中用comment on命令给表或字段加以说明,语法如下:
用法如下:
1.对表的说明
2.对表中列的说明
3.查看表的说明
sql> select * from user_tab_comments where comments is not null;
table_name table_type comments
------------------------------ ----------- --------------------------
employees table 员工表
4.查看表中列的说明
sql> select * from user_col_comments where comments is not null;
table_name column_name comments
------------------------------ ------------------------------ -------------
employees salary 员工薪水
5.我们也可以从下面这些视图中查看表级和列级说明:
6.删除表级说明,也就是将其置为空
sql> select * from user_tab_comments where table_name='employees';
table_name table_type comments
------------------------------ ----------- -------------
employees table
7.删除列级说明,也是将其置为空
sql> select * from user_col_comments where table_name='employees';
table_name column_name comments
------------------------------ ------------------------------ -------------
employees employee_id
employees manager_id
employees first_name
employees last_name
employees title
employees salary
如对本文有疑问, 点击进行留言回复!!
Oracle 基本概念 Dadabase,schema,user,table...
dbeaver连接Oracle中文乱码的解决方案--druid
Oracle常用语句(时间格式、去重、去特殊符号、查询表空间等)
网友评论