alter table TAB_SMS_BLACKLIST
add(BLACK_TYPE NUMBER default 1 not null,COMPANY_ID NUMBER,BLACK_NAME VARCHAR2(64)) ;
comment on column TAB_SMS_BLACKLIST.BLACK_TYPE
is '--黑名单级别 1-企业级,2-系统级 默认为1';
comment on column TAB_SMS_BLACKLIST.COMPANY_ID
is '--公司编号';
comment on column TAB_SMS_BLACKLIST.BLACK_NAME
is '--黑名单姓名(号码的主人),默认存储电话号码';
--删除主键
alter table tab_sms_blacklist drop primary key;
--添加单个主键
alter table tab_sms_blacklist add primary key(mobile);
--添加复合主键
alter table tab_sms_blacklist add primary key(mobile,COMPANY_ID);
--修改字段类型(长度)
alter table tab_sms_blacklist modify mobile varchar2(22);
--(添加)修改默认值
alter table tab_sms_blacklist modify COMPANY_ID default -1 not null;
备注:TAB_SMS_BLACKLIST为表名