ÓÐÒ»ÕűíA,ÊôÐÔid,name,extend,ÆäÖÐextend×Ö¶ÎΪ¿Õ£¬Ò»ÕűíC,ÊôÐÔid ,extend,c.extend²»Îª¿Õ, ÆäÖбíC.idÊDZíA.id×Ó¼¯¡£ÏÖÔÚÐèҪʹÓÃSQLʵÏÖÕâÑùµÄ¹¦ÄÜ Èç¹ûA.id = C.id ÄÇô a.extend = c.extend ·ñÔò a.extend = 0 £¿ select a.id,a.name,a.extend from a,c where a.id=c.id and a.extend = c.extend union all select a.id,a.name,a.extend from a,c where a.extend = 0 and not exists(select 1 from c where a.id=c.id) select A.id,nvl(A.extend,0) from A,C where A.id = C.id(+) ¶Ô£¬ÓÃnvlµÄ£¬Â¥Ö÷Ã÷°×µÄ
ϸöOracle for vista °æ±¾µÄ°²×°ÊÔÊÔ 10GºÍ11GµÄ http://www.oracle.com/technology/software/products/database/index.html ------------------------------------------- ......
CREATE OR REPLACE PROCEDURE usp_refreshTopN IS BEGIN --Îĵµ INSERT INTO topnresource(resourceId,title,type,cover,brief,properUser,tag,clickAmount,createDate,topNCreateDate,organizat ......