ÓÃOracleÈçºÎȥдSQLÓï¾ä - Oracle / ·Ç¼¼ÊõÇø
ÈçºÎÓÃOracle´´½¨Êý¾Ý¿â£¬ÓõÄÊÇSQLÓï¾ä¡£
ÎÒÊǸÕѧµÄ¡£×Ô¼ºÔÚÍøÉÏÕÒÁËÒ»µã£¬¾ÍÊÇ¿´²»¶®°¡¡£
Ï£ÍûÄãÃǽ«ÏêϸµÄ¡£
WINDOWS Ï ¿ØÖÆ̨ DBCA
³õѧÕß»¹ÊÇʹÓÃDatabase Configuration Assistant£¨DBCA£©°É
Èç¹ûwindows¿ÉÒÔÔÚ¿ªÊ¼²Ëµ¥ÖÐÕÒµ½´ËÏî
µ±È»Ò²¿ÉÓÃÃüÁîÐÐÊäÈëdbca´ò¿ª´ËͼÐνçÃ湤¾ß(ͨÓÃ)
Ïà¹ØÎÊ´ð£º
×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......
ÎҵĴ¦ÀíÊÇÕâÑùµÄ£º
ÎÒÓÐÒ»¸öºÜ´óµÄÊý¾Ý¼¯ºÏ£¬´¦ÓÚÐÔÄÜ·½ÃæµÄ¿¼ÂÇÐèҪʹÓÃÁÙʱ±í¹ý¶É£¬²¢ÇÒʹÓ÷ÖÒ³µÄ·½Ê½ÏòÁÙʱ±íÖвåÈëÊý¾Ý£¬Êý¾ÝʹÓÃÍê±Ïºó£¬É¾³ýÁÙʱ±íµÄÊý¾Ý¡£
³öÏÖµÄÏÖÏ󣺵±OracleÖØÐÂÆô¶¯ºó£¬µÚÒ»Ò³²åÈëµÄ ......
ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£»
ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£»
ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......
SQL code:
CREATE OR REPLACE PROCEDURE usp_refreshTopN IS
BEGIN
--Îĵµ
INSERT INTO topnresource(resourceId,title,type,cover,brief,properUser,tag,clickAmount,createDate,topNCreateDate,organizat ......
ͨ¹ýNAME×Ö¶ÎÌõ¼þ²éѯһ¸öÊý¾Ý±í£¬¼ÙÉèÎÒÓÐ100¸öÐÕÃû£¬ÓÐÒÔÏÂÁ½¸ö·½·¨£¬
·½·¨1£º
°Ñ100¸öName ×é³ÉÒ»¸öSQLÓï¾ä£¬±ÈÈç Select * from tmp_table where Name='ÕÅÈý' or Name ='ÀîËÄ' Or ...Or Name='µÚÒ»°Ù¸öÐÕÃû'
......