读书人

sql 时间重合查询时间交织查询

发布时间: 2013-04-09 16:45:09 作者: rapoo

sql 时间重合查询,时间交叉查询

select  * from  ERP_Support_date esd  where  esd.support_start_date  between  to_date('2013-03-01 18:30:00','yyyy-MM-dd hh24:mi:ss')   and to_date('2013-03-01 19:00:00','yyyy-MM-dd hh24:mi:ss')   or  esd.support_end_date between  to_date('2013-03-01 18:30:00','yyyy-MM-dd hh24:mi:ss')   and to_date('2013-03-01 19:00:00','yyyy-MM-dd hh24:mi:ss')

查询'2013-03-01 18:30:00' -'2013-03-01 19:00:00' 包含这半小时时间段的所以时间

读书人网 >SQL Server

热点推荐