需求:一条时间区间数据,按天拆分成多条数据
这时候需要用到递归遍历RECURSIVE
所用数据表date_to_more如下:
首先构建一个临时递归查询表,然后与date_to_more进行关联查询
with recursive t(n) as (
select 0
union all
select n+1 from t where n<(
需求:一条时间区间数据,按天拆分成多条数据
这时候需要用到递归遍历RECURSIVE
所用数据表date_to_more如下:
首先构建一个临时递归查询表,然后与date_to_more进行关联查询
with recursive t(n) as (
select 0
union all
select n+1 from t where n<(