数据库comment

comment:注释

mysql

1
2
3
4
5
6
7
8
9
10
11
12
13
create table test1
(
field_name int comment '字段的注释'
)comment='表的注释';

alter table test1 comment '修改后的表的注释';

alter table test1 modify column field_name int comment '修改后的字段注释';

show create table test1;

show full columns from test1;

oracle

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
comment on table CRM_SATISFACTION is '客户满意度调查表'
select * from user_tab_comments where table_name = 'CRM_SATISFACTION';

comment on column CRM_SATISFACTION.ID is '主键';
comment on column CRM_SATISFACTION.SERVICE_INFO_ID is '服务单号';
comment on column CRM_SATISFACTION.RESEARCH_STATE is '调研状态 0-已发送短信 1-客户已回复';
comment on column CRM_SATISFACTION.CUSTOMER_PHONE is '客户手机号';
comment on column CRM_SATISFACTION.SEND_SMS_TIME is '发送时间';
comment on column CRM_SATISFACTION.CUSTOMER_REPLY_TIME is '客户回复时间';
comment on column CRM_SATISFACTION.CUSTOMER_REPLY_CONTENT is '客户回复内容';
comment on column CRM_SATISFACTION.CUSTOMER_NAME is '客户名称';
comment on column CRM_SATISFACTION.RECEIVE_PROBLEM_TIME is '问题接收时间';
comment on column CRM_SATISFACTION.PRODUCT_ID is '产品型号';
comment on column CRM_SATISFACTION.VIN_NAME is 'vin码';
comment on column CRM_SATISFACTION.SITE_TYPE is '提报单位类型';
comment on column CRM_SATISFACTION.SITE_NAME is '提报单位';
comment on column CRM_SATISFACTION.WORKER is '服务人员';
comment on column CRM_SATISFACTION.NEW_ERROR_DESC is '错误描述';
comment on column CRM_SATISFACTION.NEW_PROVINCEID_NAME is '省份';
comment on column CRM_SATISFACTION.NEW_VINSPEC is '是否在保';

select * from user_col_comments where table_name = 'CRM_SATISFACTION' and column_name = 'CUSTOMER_REPLY_CONTENT'