摘要: DECLARE @sonumber BIGINTSELECT @sonumber=CONVERT(BIGINT, @serverId + Substring(CONVERT(VARCHAR(4), Datepart(yy, Getdate())), 4, 1) + Substring(CONVERT(VARCHAR(10), Getdate(),12),3,6) + CONVERT(VARCHAR(100), CAST( Rand()*(999999 -100000)+100000 AS DECIMAL( 38, 0)))) SELECT @sonumber AS id可以用一个表去维护,当. 阅读全文
posted @ 2013-06-28 15:25 itor 阅读(426) 评论(0) 推荐(0) 编辑