`
jinchun1223
  • 浏览: 255271 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论

comment [Oracle SQL]

阅读更多

<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>

分享到:
评论

相关推荐

    最新全国行政区划编码 sql(3级,2016-08-09 统计局发布)

    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 文件时,如果包含列注释,可能会在导入到 MySQL 数据库中时丢失。这是因为 PowerDesigner 导出的 SQL ...

    oracle表字段或是视图字段添加备注方法

    在本节中,我们将详细介绍如何使用 Oracle 的 Comment 机制来添加备注信息到表字段或视图字段中。 添加备注信息到表字段或视图字段的方法 在 Oracle 中,添加备注信息到表字段或视图字段的方法非常简单。我们可以...

    Oracle PL-SQL编程手册 .doc

    SQL命令 以下17个是作为语句开头的关键字: alter drop revoke audit grant rollback* commit* insert select comment lock update create noaudit validate delete rename

    Oracle练习.txt

    SQL&gt;comment on column 表.列 is '列注释'; 注释已创建。 查询该用户下的注释不为空的表 SQL&gt; select * from user_tab_comments where comments is not null; 5.如何在ORACLE中取毫秒? select systimestamp from ...

    Oracle-SQL-Scripts:我多年来编写的其他Oracle SQL脚本,涉及性能,统计信息和例行检查等

    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 ...

    Oracle8i_9i数据库基础

    第一部分 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...

    2020全国行政区代码数据库城市字典数据

    2:有sql文件,可以直接导入mysql或者oracle数据库中 一共3235条数据 表结构 CREATE TABLE `area` ( `id` int(11) NOT NULL COMMENT 'ID', `name` varchar(30) NOT NULL COMMENT '地区名称', `parent_id` ...

    Oracle事例

    sql&gt; create user juncky identified by oracle default tablespace users sql&gt; temporary tablespace temp quota 10m on data password expire sql&gt; [account lock|unlock] [profile profilename|default]; ...

    SQL中WHERE变量IS NULL条件导致全表扫描问题的解决方法

    代码如下: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开发时,...

    name2comment.vbs

    都只是注释了一些复杂的字段,一些简单的字段根本就不用注释,见到code就知道其中的意思,奈何本人英文水平有限,加上一些英文单词太长进行了简写,我就想要把字段名称name这列复制到没有注释的comment列里面,这样...

    中国城市sql数据表,导入就可以使用

    中国所有城市数据元表,导入数据库就可以使用,mysql,Oracle都可以用 CREATE TABLE `city` ( `id` int(11) NOT NULL AUTO_INCREMENT, `province_id` bigint(20) UNSIGNED NOT NULL, `province_name` char(64) ...

    oracle从入门到精通

    一、SQL ...........................................................................................................................................................8 1.1、基本概念: ..................

    SQL | 创建时间,更新时间,使用默认值自动设置|data-412945.pdf

    在数据库表设计中,经常会使用到创建...SQL语句如下: ALTER TABLE 表名 ADD ( `create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` TIMESTAMP not null DEFAULT CUR

    MySql创建带解释的表及给表和字段加注释的实现代码

    gid INT PRIMARY KEY AUTO_INCREMENT COMMENT '设置主键自增', gname VARCHAR(200) COMMENT '列注释' ) COMMENT='\u8868\u6ce8\u91ca'; 2 修改现有列,加上解释 alter table test_data modify column test_desc ...

    CnPlugin_1.5.4

    增加了PL/SQL Developer工具本身所没有的一些小功能,功能基本一些已有官方插件的整合,以方便Oracle编程开发。 1.5.400现有功能简要说明: 主菜单功能 所有主菜单可在PL/SQL中设置工具栏按钮,以方便调用 CnPlugin...

    PLSQL.Developer v11.0.0.1762 主程序+ v10中文包+keygen

    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 ...

    plsqldev12.0.4.1826x64主程序+ v12中文包+keygen

    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....

    PLSQL Developer 11 中文绿色版

    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

    Oracle从入门到精通

    5、给表加注释:COMMENT ................................... 6、约束条件:............................................. 2.5.视图 (VIEW) ........................................ 2.6、序列:...............

Global site tag (gtag.js) - Google Analytics