Oracle 9i 数据库WITH查询语法小议(转)[@more@] Oracle9i新增了WITH语法功能,可以将查询中的子查询命名,放到SELECT语句的最前面。
下面看一个简单的例子:
下面看一个简单的例子:
CODE:
SQL> WITH
2 SEG AS (SELECT SEGMENT_NAME, SUM(BYTES)/1024 K FROM USER_SEGMENTS GROUP BY SEGMENT_NAME), 3 OBJ AS (SELECT OBJECT_NAME, OBJECT_TYPE FROM USER_OBJECTS) 4 SELECT O.OBJECT_NAME, OBJECT_TYPE, NVL(S.K, 0) SIZE_K 5 FROM OBJ O, SEG S 6 WHERE O.OBJECT_NAME = S.SEGMENT_NAME (+) 7 ; OBJECT_NAME OBJECT_TYPE SIZE_K DAIJC_TEST TABLE 128 P_TEST PROCEDURE 0 IND_DAIJC_TEST_C1 INDEX 128 来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10617731/viewspace-960539/,如需转载,请注明出处,否则将追究法律责任。
请登录后发表评论
登录
全部评论
<%=items[i].createtime%>
<%=items[i].content%> <%if(items[i].items.items.length) { %>
<%for(var j=0;j
<%}%> <%}%>
<%=items[i].items.items[j].createtime%>
<%=items[i].items.items[j].username%> 回复 <%=items[i].items.items[j].tousername%>: <%=items[i].items.items[j].content%>
还有<%=items[i].items.total-5%>条评论
) data-count=1 data-flag=true>点击查看
<%}%>
|
转载于:http://blog.itpub.net/10617731/viewspace-960539/