Home > Database > Oracle > body text

How to modify comments in oracle

WBOY
Release: 2022-03-01 10:17:56
Original
10261 people have browsed it

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 '注释内容'
Copy after login

2. Field comment modification syntax:

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

For example:

1. Create table:

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

2. Add table comments:

  Comment on table t1 is '个人信息';
Copy after login

3. Add field comments:

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!