SQL语句生成指定范围内随机数
2024-09-20 21:49:51
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
最新文章
- Linux内核分析:dup、dup2的实现
- python语法笔记(五)
- watch 命令实时命令执行监控
- Linux下的iwpriv(iwlist、iwconfig)的简单应用
- HNOI 2008:水平可见直线
- JSP - request - 1
- View和viewController的生命周期
- iOS Dev (22) 文件、路径
- 实现Windows程序的更新
- Resharper使用详解(转)
- go学习笔记
- events.py 知识点记录
- HTML文本结构及常用标签
- Eslint 规则说明
- jar与war包区别,转自https://www.jianshu.com/p/3b5c45e8e5bd
- day01-Python输出
- win命令行下载
- 利用Regsvr32绕过Applocker的限制策略
- Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapinfo' (aka) 'enum CGBitmapInfo')
- Animate.css介绍
热门文章
- Ubuntu 一直掉线 以及连不上网 解决办法
- [bzoj2588][count on a tree] (主席树+lca)
- eclipse安装版本
- 跨应用使用Spoon框架截图的方法
- tomcat 8.5.9.0 解决catalina.out过大的问题
- [LeetCode] Longest Substring with At Most K Distinct Characters 最多有K个不同字符的最长子串
- [LeetCode] Search a 2D Matrix II 搜索一个二维矩阵之二
- 开发socketserver 以及定制开发自己的FTP服务器
- Canvas电子签名和游戏化
- ABP 索引