首页 > 数据库 >sqlserver between

sqlserver between

时间:2022-10-28 18:24:07浏览次数:53  
标签:UpdateTime 06 17 49 sqlserver 2018 between

 sqlserver between

----如果UpdateTime为''或者为null,就用InsertTime条件查询
select * 
from WxUsers where BID='957' and ParentID='5537821'
and (COALESCE(UpdateTime,InsertTime) between '2016-06-06 17:49:13.755' and '2018-06-07 17:49:13.759' )

 

=====================================================

--UpdateTime='2018-06-06 17:49:13.760'
select * from  WxUsers where UserID='5537821'
and ( UpdateTime between '2018-06-06 17:49:13.755'and '2018-06-06 17:49:13.758' )
--结果没有数据

select * from  WxUsers where UserID='5537821'
and ( UpdateTime between '2018-06-06 17:49:13.755'and '2018-06-06 17:49:13.759' )
--结果有数据

select * from  WxUsers where UserID='5537821'
and ( UpdateTime between '2018-06-06 17:49:13.762'and '2018-06-06 17:49:13.765' )
--结果没有数据

select * from  WxUsers where UserID='5537821'
and ( UpdateTime between '2018-06-06 17:49:13.761'and '2018-06-06 17:49:13.765' )
--结果有数据

 

=====================================================

 

 

=====================================================

搜索

复制

标签:UpdateTime,06,17,49,sqlserver,2018,between
From: https://www.cnblogs.com/jankie1122/p/11108835.html

相关文章