随机数
declare @re int,@num int
select @num =8
select @re=CONVERT(int, POWER(10,@num)*RAND())
if len(@RE) <@num
select POWER(10,@num-len(@RE))*@re
else
select @re
select @num =8
select @re=CONVERT(int, POWER(10,@num)*RAND())
if len(@RE) <@num
select POWER(10,@num-len(@RE))*@re
else
select @re