Home  >  Article  >  Database  >  How to modify comments in oracle

How to modify comments in oracle

WBOY
WBOYOriginal
2022-03-01 10:17:5610272browse

How to modify comments in oracle: 1. Use the statement "comment on table table name is 'comment content'" to modify table comments; 2. Use "comment on column table name. Field name is 'comment content'" Statement modifies table field comments.

How to modify comments in oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to modify comments in oracle

Comment (comment) modification method in Oracle database: There are two situations, one is table comment and the other is field comment. The method of adding or modifying annotation content to a table or table field is the same.

1. Table comment modification syntax:

comment on table 表名 is '注释内容'

2. Field comment modification syntax:

comment on column 表名.字段名 is '注释内容'

For example:

1. Create table:

  CREATE TABLE t1(id varchar2(32) primary key,name VARCHAR2(8) NOT NULL,age number);

2. Add table comments:

  Comment on table t1 is '个人信息';

3. Add field comments:

  comment on column t1.id is 'id';
  comment on column t1.nameis '姓名';
  comment on column t1.age is '年龄';

Recommended tutorial: "Oracle Video Tutorial"

The above is the detailed content of How to modify comments in oracle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn