SQL语句求解 时间
时间:2011-12-22
来源:互联网
select*from biaoA where time between (select CONVERT(varchar(12),getdate(),23)+' 00:00:00.000') and (select CONVERT(varchar(12),getdate(),23)+' 01:00:00.000')
select*from biaoA where time between (select CONVERT(varchar(12),getdate(),23)+' 01:00:00.000') and (select CONVERT(varchar(12),getdate(),23)+' 02:00:00.000')
.
.
.
select*from biaoA where time between (select CONVERT(varchar(12),getdate(),23)+' 23:00:00.000') and (select CONVERT(varchar(12),getdate(),23)+' 24:00:00.000')
表A有个字段为 这样 '2011-12-22 20:20:20.222' 时间 CONVERT(varchar(12),getdate(),121)的
我想把 24小时 的 所有的 SQL语句 写成1条 或者 写出 如果是 系统为1:30 分 那么就查询出 1点到2点的数据
要根据当前的系统时间 自动跳一段时间内的数据
希望 那个大神帮忙下0 0 跪求ing
select*from biaoA where time between (select CONVERT(varchar(12),getdate(),23)+' 01:00:00.000') and (select CONVERT(varchar(12),getdate(),23)+' 02:00:00.000')
.
.
.
select*from biaoA where time between (select CONVERT(varchar(12),getdate(),23)+' 23:00:00.000') and (select CONVERT(varchar(12),getdate(),23)+' 24:00:00.000')
表A有个字段为 这样 '2011-12-22 20:20:20.222' 时间 CONVERT(varchar(12),getdate(),121)的
我想把 24小时 的 所有的 SQL语句 写成1条 或者 写出 如果是 系统为1:30 分 那么就查询出 1点到2点的数据
要根据当前的系统时间 自动跳一段时间内的数据
希望 那个大神帮忙下0 0 跪求ing
作者: sunxunbendan 发布时间: 2011-12-22
case when ... then
when ... then
..........
when ... then
..........
作者: fredrickhu 发布时间: 2011-12-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28