SQL随机生成6位数字

SELECT RIGHT(100000000 + CONVERT(bigint, ABS(CHECKSUM(NEWID()))), 6)

原文地址:https://www.cnblogs.com/lxshanye/p/4027187.html