摘要: 在sqlserver生成对应格式的订单号 比如 P + 年月日+业务ID +序列。订单号规则有两种:单号生成规则:P+当天日期(年月日)+零售商注册序号+0000;单一商品订单流水号: P+当天日期(年月日)+批发部注册序号+零售商注册序号+0000思路 1. 生成 0000 --> 9999之间的伪序列 a. 新建一张序列表 b. 模拟oracle中的序列自增长 2. 用伪序列 + 规则生成订单号创建 序列表 1 create table seqTable --序列表2 (3 sellerId int,4 buyerId int,5 createDate var... 阅读全文
posted @ 2012-08-22 00:52 老邝 阅读(696) 评论(0) 推荐(0) 编辑