标签:level char 临时表 collate 修改 编号 key primary var
DROP TEMPORARY TABLE IF EXISTS `SAM_ORDERSIGN_EXCEL_TEMP`;
CREATE TEMPORARY TABLE `SAM_ORDERSIGN_EXCEL_TEMP` (
`CHANNEL` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘渠道‘,
`CHANNEL_NAME` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘渠道名称‘,
`SKU_CHANNEL` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘要货渠道‘,
`PURCHASE_NO` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘采购单号‘,
`WAREHOUSELEVEL2` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘二级仓库‘,
`CHANNEL_SKU` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘商品编号‘,
`CHAI_MATERIA_NO` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘拆分后料号‘,
`IS_PACKAGE` varchar(10) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘套餐否‘,
`PURCHASEORDER_QUANTITY` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘采购数量‘,
`PURCHASE_PRICE` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘采购价格‘,
`ACTUAL_QUANTITY` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘实收数量‘,
`REQUISITION_NO` varchar(30) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘调拨申请单号‘,
`ORDER_NO` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘财务订单号‘,
`GOODS_MODEL` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘型号‘,
`PRODUCTION_MATERIA` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘料号‘,
`RESERVATION_ARRIVEDATE` date DEFAULT NULL COMMENT ‘预约到货日期‘,
`CHANNEL_RECEIVE_DATE` date DEFAULT NULL COMMENT ‘渠道入库时间‘,
`RESERVATION_RECEIPTNO` varchar(80) COLLATE utf8_bin DEFAULT ‘‘ COMMENT ‘预约入库单号‘,
`ITEM` INT(10) AUTO_INCREMENT COMMENT ‘EXCEL项次‘,
PRIMARY KEY (`CHANNEL`,`PURCHASE_NO`,`WAREHOUSELEVEL2`,`CHANNEL_SKU`,`REQUISITION_NO`,`ITEM`),
UNIQUE INDEX `idx_uniq_item` (`ITEM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=‘电商订单签收导入临时表‘;
ALTER TABLE SAM_ORDERSIGN_EXCEL_TEMP AUTO_INCREMENT=2;//从2开始自增
set @@auto_increment_offset = 1;//设置自增为1
标签:level char 临时表 collate 修改 编号 key primary var
原文地址:https://www.cnblogs.com/sikuaiwu/p/11357656.html