当前位置:网站首页>postgresql 生成随机日期,随机时间
postgresql 生成随机日期,随机时间
2022-07-31 08:59:00 【MonkeyKing_sunyuhua】
生成随机的时间的SQL
SELECT make_time(floor((random() * 12))::int, floor((random() * 60))::int, floor((random() * 60))::int) AS rand_time;
生成随机的日期的SQL
SELECT current_date - floor((random() * 25))::int
生成随机的年月日时分秒的SQL
SELECT concat(current_date - floor((random() * 25))::int,' ',make_time(floor((random() * 12))::int, floor((random() * 60))::int, floor((random() * 60))::int))
边栏推荐
猜你喜欢
随机推荐
科目三:左转弯
skynet中一条消息从取出到处理完整流程(源码刨析)
【小程序项目开发--京东商城】uni-app之自定义搜索组件(上)-- 组件UI
文件的逻辑结构与物理结构的对比与区别
sqli-labs(less-11)
Kotlin 优点
UE4插件软链接(关联)
0730~Mysql优化
【小程序专栏】总结uniapp开发小程序的开发规范
jupyter notebook初使用
Cloud server deployment web project
关于Error EPERM operation not permitted, mkdir...几种解决办法的比较
sqlmap使用教程大全命令大全(图文)
A brief introduction to the SSM framework
SSM框架讲解(史上最详细的文章)
MySQL 排序
搭建frp进行内网穿透
功能强大的国产Api管理工具
Vulkan与OpenGL对比——Vulkan的全新渲染架构
生成随机数