暂无图片
Oracle 判断两个时间段是否重叠,有什么好方法?
我来答
分享
暂无图片 匿名用户
Oracle 判断两个时间段是否重叠,有什么好方法?

Oracle 判断两个时间段是否重叠,有什么好方法?

我来答
添加附件
收藏
分享
问题补充
2条回答
默认
最新
Ellison

判断两个时间段是否有重叠

(a,b),(c,d)

判断两段时间是否有重叠

方法一

select 'yes' from dual where d>a and c<b;

方法二

select 'yes' from dual where (a, b) overlaps (c,d);

方法三

select 'yes' from dual where a between c and d or d between a and b;
————————————————
链接:https://blog.csdn.net/y1535623813/article/details/118029261

暂无图片 评论
暂无图片 有用 3
谢宇恒

用时间交集函数overlaps 

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏