首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

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

2013-04-09 
sql 时间重合查询,时间交叉查询select* fromERP_Support_date esdwhereesd.support_start_datebetweento_d

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'   包含这半小时时间段的所以时间

热点排行