修改表结构

修改表结构:

1.添加表字段:

          形式,alter table 表名  add 表字段名称 字段类型; 例如

          alter table SERIAL_NUM_INFO add SUPPLIER_CODE varchar2(20);

2.删除表字段:

         alter  table PERSON drop  column Birthday;

3.修改字段长度
         alter table order_sync_history
                 modify (ORDER_CHANGE_STATUS varchar2(5));

4. 添加唯一约束
         alter table order_sync
                 add constraint order_sync_unique unique(order_id,create_time);

5.表字段添加备注

       comment on column PHONENUMBER.DUE_TIME is '到期时间';

猜你喜欢

转载自operating---mydream.iteye.com/blog/2194545