<pre name="code" class="java">comment [Oracle SQL]
comment on table some_table is 'some hopefully meaningful comment for some_table';
comment on table some_view is 'Views can also be commented, yet the statement is still: comment on table';
comment on column some_table.col_1 is 'Be sure to really give some meaningful comment';
comment on column some_view.col_1 is 'Useless, or wrong comments, are worse than no comment at all';
The comment statement allows to store some comments about tables, views or columns in the data dictionary. Even when views are commented, the syntax is comment on table. The comments for tables and views can be retrieved with something like column comments format a50
select table_name, comments from user_tab_comments where table_name like 'SOME%';
TABLE_NAME COMMENTS
------------------------------ --------------------------------------------------
SOME_TABLE some hopefully meaningful comment for some_table
SOME_VIEW Views can also be commented, yet the statement is
still: comment on table
Similarly, the comments for columns can be found with something like column comments format a50
select table_name, column_name, comments from user_col_comments where table_name like 'SOME%';
TABLE_NAME COLUMN_NAME COMMENTS
------------------------------ ------------------------------ --------------------------------------------------
SOME_TABLE COL_1 Be sure to really give some meaningful comment
SOME_TABLE COL_2
SOME_TABLE COL_3
SOME_VIEW COL_1 Useless, or wrong comments, are worse than no comm
ent at all
SOME_VIEW COL_2
SOME_VIEW COL_3
See also comments (PL/SQL).
</pre>
<p> </p>
分享到:
相关推荐
sys_area_oracle.sql(结构和数据) sys_area_mysql.sql(结构和数据) sys_area_office.xlsx Oracle版本: create table SYS_AREA ( code VARCHAR2(20) not null, parent_code VARCHAR2(20), name VARCHAR2(64)...
PowerDesigner 导出的 SQL 带列注释,导入到 MySQL 中列注释不见了的处理方法 在使用 PowerDesigner 导出 SQL 文件时,如果包含列注释,可能会在导入到 MySQL 数据库中时丢失。这是因为 PowerDesigner 导出的 SQL ...
在本节中,我们将详细介绍如何使用 Oracle 的 Comment 机制来添加备注信息到表字段或视图字段中。 添加备注信息到表字段或视图字段的方法 在 Oracle 中,添加备注信息到表字段或视图字段的方法非常简单。我们可以...
SQL命令 以下17个是作为语句开头的关键字: alter drop revoke audit grant rollback* commit* insert select comment lock update create noaudit validate delete rename
SQL>comment on column 表.列 is '列注释'; 注释已创建。 查询该用户下的注释不为空的表 SQL> select * from user_tab_comments where comments is not null; 5.如何在ORACLE中取毫秒? select systimestamp from ...
Oracle SQL脚本漏洞: - PL/SQL compiler will report the very weird error of PLS-00103 if adding a comment after the call procedure clause in a trigger数据库设计演示: - Using a simple SQL Demo of DB ...
第一部分 Oracle SQL*PLUS基础 23 第一章 Oracle数据库基础 23 §1.1 理解关系数据库系统(RDBMS) 23 §1.1.1 关系模型 23 §1.1.2 Codd十二法则 24 §1.2 关系数据库系统(RDBMS)的组成 24 §1.2.1 RDBMS 内核 24...
2:有sql文件,可以直接导入mysql或者oracle数据库中 一共3235条数据 表结构 CREATE TABLE `area` ( `id` int(11) NOT NULL COMMENT 'ID', `name` varchar(30) NOT NULL COMMENT '地区名称', `parent_id` ...
sql> create user juncky identified by oracle default tablespace users sql> temporary tablespace temp quota 10m on data password expire sql> [account lock|unlock] [profile profilename|default]; ...
代码如下:SET @SQL = ‘SELECT * FROM Comment with(nolock) WHERE 1=1 And (@ProjectIds Is Null or ProjectId = @ProjectIds) And (@Scores is null or Score =@Scores)’ 印象中记得,以前在做Oracle开发时,...
都只是注释了一些复杂的字段,一些简单的字段根本就不用注释,见到code就知道其中的意思,奈何本人英文水平有限,加上一些英文单词太长进行了简写,我就想要把字段名称name这列复制到没有注释的comment列里面,这样...
中国所有城市数据元表,导入数据库就可以使用,mysql,Oracle都可以用 CREATE TABLE `city` ( `id` int(11) NOT NULL AUTO_INCREMENT, `province_id` bigint(20) UNSIGNED NOT NULL, `province_name` char(64) ...
一、SQL ...........................................................................................................................................................8 1.1、基本概念: ..................
在数据库表设计中,经常会使用到创建...SQL语句如下: ALTER TABLE 表名 ADD ( `create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` TIMESTAMP not null DEFAULT CUR
gid INT PRIMARY KEY AUTO_INCREMENT COMMENT '设置主键自增', gname VARCHAR(200) COMMENT '列注释' ) COMMENT='\u8868\u6ce8\u91ca'; 2 修改现有列,加上解释 alter table test_data modify column test_desc ...
增加了PL/SQL Developer工具本身所没有的一些小功能,功能基本一些已有官方插件的整合,以方便Oracle编程开发。 1.5.400现有功能简要说明: 主菜单功能 所有主菜单可在PL/SQL中设置工具栏按钮,以方便调用 CnPlugin...
You can now use a Records=[all|page|] directive in a comment section of the SQL Window to control the number of initially fetched records You can now use a Totals=[mode:column] directive in a comment ...
You can now suppress a hint or warning for a specific line of code by adding a "-- Ignore" comment. The Code Contents pane now shows local subprograms within a procedure/function in a separate folder....
PL/SQL Developer 11.0 - New Features Below you can find a brief description of the ... You can now use a Totals=[mode:column] directive in a comment section of the SQL Window to display column totals
5、给表加注释:COMMENT ................................... 6、约束条件:............................................. 2.5.视图 (VIEW) ........................................ 2.6、序列:...............