Oracle修改表或者字段的注釋


語句:
comment on table 表名 is '表的注釋信息'; comment on column 表名.字段名 is '字段的注釋信息';

注意表名的大小寫

例如:
1、創建表:
  CREATE TABLE Student(
    id varchar2(32) primary key,
    name varchar2(8) not null,
    age number
  );
2、添加表注釋:
  Comment on table Student is '個人信息';
  修改表注釋:
  Comment on table Student is '學生個人信息';
3、添加字段注釋:
  comment on column Student.id is 'id';
  comment on column Student.name is '姓名';
  comment on column Student.age is '年齡';
  修改字段注釋:
  comment on column Student.id is '學生id';
  comment on column Student.name is '學生姓名';
  comment on column Student.age is '學生年齡';


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM