oracle 表a,有3列,id,start(date),end(date)有两条数据:1 2011-04-10 2011-04-112 2011-04-12 2011-04-13我想显示:1 2011-04-101 2011-04-112 2011-04-12 2 2011-04-13开始时间和结束时间是间隔的1 2011-04-10 2011-04-122 2011-0
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 08:38:30
oracle 表a,有3列,id,start(date),end(date)有两条数据:1 2011-04-10 2011-04-112 2011-04-12 2011-04-13我想显示:1 2011-04-101 2011-04-112 2011-04-12 2 2011-04-13开始时间和结束时间是间隔的1 2011-04-10 2011-04-122 2011-0
oracle 表a,有3列,id,start(date),end(date)
有两条数据:
1 2011-04-10 2011-04-11
2 2011-04-12 2011-04-13
我想显示:
1 2011-04-10
1 2011-04-11
2 2011-04-12
2 2011-04-13
开始时间和结束时间是间隔的
1 2011-04-10 2011-04-12
2 2011-04-13 2011-04-15
显示:
1 2011-04-10
1 2011-04-11
1 2011-04-12
2 2011-04-14
2 2011-04-13
2 2011-04-15
oracle 表a,有3列,id,start(date),end(date)有两条数据:1 2011-04-10 2011-04-112 2011-04-12 2011-04-13我想显示:1 2011-04-101 2011-04-112 2011-04-12 2 2011-04-13开始时间和结束时间是间隔的1 2011-04-10 2011-04-122 2011-0
select * from
(select a.id,a.start as tdate
union all
select a.id,a.end as tdate) t
order by t.id,t.tdate