先建一个表 random(num). 然插入你想要的范围,比如1到10的整数。 然后select top 1 num from random order by newid(),你就可以得到一个固定范围内的一个随机的数字。