oracle查询父栏目下的子栏目所有数据
2011/1/7 8:29:41 mj_hailou http://mj-hailou.javaeye.com
我要评论(0)
- 摘要:selectt.idfromcolumninfotconnectbypriort.id=t.colsupidstartwitht.id=126selectcon.id,con.contname"最新资讯",con.contentsrc"信息来源",to_char(con.issuedate,'yyyy-mm-dd')"发布时间"fromcontentconwhereto_char(con.issuedate,'yyyy-MM-dd')>='2010-01-01'andto_char
- 标签:ORA 数据 Oracle
select t.id from columninfo t connect by prior t.id=t.colsupid start with t.id=126
select con.id, con.contname "最新资讯" ,con.contentsrc "信息来源",to_char(con.issuedate,'yyyy-mm-dd') "发布时间" from content con
where to_char(con.issuedate , 'yyyy-MM-dd') >= '2010-01-01'
and to_char(con.issuedate , 'yyyy-MM-dd') <= '2010-12-31'
and con.columninfoid in(select t.id from columninfo t connect by prior t.id=t.colsupid start with t.id=126);