1、生成随机实型数据

create procedure awf_RandDouble 
   @min dec(14,2),
   @max dec(14,2), 
   @result dec(14,2) output
as 
begin
	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
as 
begin
	set @result= cast((rand()*(@max-@min)+@min) as int)
    return @result
end

  

相关文章:

  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案