— 创建已上传单据号表
create table uploaded_traceability
(
vbillcode varchar(50) not null,
data_type number(2) not null,
upload_date DATE
);
— 添加字段注释
COMMENT ON COLUMN uploaded_traceability.vbillcode IS '已上传的单据号';
COMMENT ON COLUMN uploaded_traceability.data_type IS '已上传的数据类型:1 基地端,2 产区端,3 生产端';
— 添加索引
create index up_vbillcode_idx on uploaded_traceability(vbillcode);
create index up_data_type_idx on uploaded_traceability(data_type);
— 新增字段
ALTER TABLE uploaded_traceability
ADD uplaod_date DATE;
— 修改字段名
alter table uploaded_traceability rename column uplaod_date to upload_date;
评论前必须登录!
注册