set @result= cast((rand()*(@max-@min)+@min) as dec(14,2)) return @result end

2、生成随机整型数据

create procedure awf_RandInt 
   @min int,
   @max int, 
   @result int output
begin
	set @result= cast((rand()*(@max-@min)+@min) as int)
    return @result