Oracle²»Í¬ÐеÄijÁÐ×Ö·û´®Ïà¼Ó,È¥³ýÖظ´Öµ
ÓÐÈçϱíTest
City People Make
¹ãÖÝ 1 A
¹ãÖÝ 2 B
¹ãÖÝ 3 C
ÉϺ£ 4 A
ÉϺ£ 5 E
¹ãÖÝ 6 A
ÉϺ£ 7 E
ʵÏÖÈçÏÂЧ¹û
City People Make
ÉϺ£ 16 AE
¹ãÖÝ 12 ABC
ÔÚ¹«Ë¾ÂÛ̳¿´µ½ÓÐÈ˶ÔÕâ¸öÒªÇóµÄʵÏÖ£¬¾õµÃÓе㸴ÔÓ¡£×Ô¼ºÑо¿ÁËÏ£¬ÖØÐÂдÁËÏÂsqlÈçÏ£º
9I£¨Ã»Óл·¾³²âÊÔ£¬µ«ÊǺ¯ÊýÔÚ9IÖкÃÏñ¶¼ÊÇÒѾÓÐÁ˵ģ©£º
WITH TEST AS (SELECT CITY,MAKE,SUM(PEOPLE) PEOPLE from Test GROUP BY CITY,MAKE ORDER BY CITY,MAKE)
SELECT CITY,SUM(PEOPLE),(select REVERSE(ltrim(max(sys_connect_by_path(MAKE,',')),',')) MAKE
from
(
SELECT MAKE,CITY,ROWNUM numberid from TEST
) T1 WHERE T1.CITY = T2.CITY
start with T.CITY = T2.CITY connect by prior numberid = numberid+1
) MAKE from TEST T2 GROUP BY CITY
10G£º
WITH TEST AS (SELECT CITY,MAKE,SUM(PEOPLE) PEOPLE from Test GROUP BY CITY,MAKE ORDER BY CITY,MAKE)
SELECT CITY,SUM(PEOPLE),WMSYS.WM_CONCAT(MAKE) from TEST GROUP BY CITY
==========================================================
Ïà¹Ø¹Ø¼ü×Ö£º
1.sys_connect_by_path º¯ÊýÖ÷Òª×÷ÓÃÊÇ¿ÉÒÔ°ÑÒ»¸ö¸¸½ÚµãϵÄËùÓÐ×Ó½Úµãͨ¹ýij¸ö×Ö·û½øÐÐÇø·Ö
2.start with ... connect by prior ... µÝ¹éʵÏÖ£¬Èç
start with pid= 1 connect by prior pid = id
//¸¸id=×Óid¡¡¡¡ ÕýÊ÷Ðͽṹ¡¡¡¡¡¡ ×Óid=¸¸id µ¹Ê÷Ðͽṹ
ÉÏÃæµÄSQLÖÐ×¢Òâ
start with T.CITY = T2.CITY connect by prior numberid = numberid+1
Óëstart with T.CITY = T2.CITY connect by prior numberid+1 = numberidµÄÇø±ð
3.REVERSE×Ö·û´®·´×ª
===========================================================
»Ø¹ËÏÂÆäËû£º
1.Group By, Having, Where, Order by¼¸¸öÓï¾äµÄÖ´ÐÐ˳Ðò¡£Ò»¸öSQLÓï¾äÍùÍù»á²úÉú¶à¸öÁÙʱÊÓͼ£¬ÄÇôÕâЩ¹Ø¼ü×ÖµÄÖ´ÐÐ˳Ðò¾Í·Ç³£ÖØÒªÁË£¬ÒòΪÄã±ØÐëÁ˽âÕâ¸ö
Ïà¹ØÎĵµ£º
µ¼Èë/µ¼³öÊÇORACLEÐÒ´æµÄ×î¹ÅÀϵÄÁ½¸öÃüÁîÐй¤¾ß£¬ÆäʵÎÒ´ÓÀ´²»ÈÏΪExp/ImpÊÇÒ»Öֺõı¸·Ý·½Ê½£¬ÕýÈ·µÄ˵·¨ÊÇExp/ImpÖ»ÄÜÊÇÒ»¸öºÃµÄת´¢¹¤¾ß£¬ÌرðÊÇÔÚСÐÍÊý¾Ý¿âµÄת´¢£¬±í¿Õ¼äµÄǨÒÆ£¬±íµÄ³éÈ¡£¬¼ì²âÂß¼ºÍÎïÀí³åÍ»µÈÖÐÓв»Ð¡µÄ¹¦ÀÍ¡£µ±È»£¬ÎÒÃÇÒ²¿ÉÒÔ°ÑËü×÷ΪСÐÍÊý¾Ý¿âµÄÎïÀí±¸·ÝºóµÄÒ»¸öÂß¼¸¨Öú±¸·Ý£¬Ò²ÊDz»´íµ ......
Oracle Êý¾Ý¿â 11gÃæÏò DBA ºÍ¿ª·¢ÈËÔ±µÄÖØÒªÐÂÌØÐÔ:SecureFiles£º
1¡¢SecureFiles£ºÐ LOB
Á˽âÈçºÎʹÓÃÐÂÒ»´ú LOB£ºSeureFiles¡£SecureFiles ¼¯ÍⲿÎļþºÍÊý¾Ý¿â LOB ·½·¨µÄÓŵãÓÚÒ»Éí£¬¿ÉÒÔ´æ´¢·Ç½á¹¹»¯Êý¾Ý£¬ÔÊÐí¼ÓÃÜ¡¢Ñ¹Ëõ¡¢Öظ´Ïû³ýµÈµÈ¡£
Êý¾Ý¿âפÁô BLOBS »ò OS Îļþ
ÄúÔÚ Oracle Êý¾Ý¿âÖÐ ......
SQLProgressÊÇÒ»¸öСÇɵIJÙ×÷Êý¾Ý¿âµÄ¹¤¾ß£¬ËùÓеİ汾¶¼²»³¬¹ý3M£¬°üÀ¨ÏÖÔÚ×îеÄ34°æ±¾¡£33ÒÔ¼°ÒÔÇ°µÄ°æ±¾ÐèÒª°²×°BDE²ÅÄÜÔËÐУ¬´Ó34¿ªÊ¼£¬Ö»Ö§³ÖOracleÊý¾Ý¿â£¬²ÉÓÃODAC×÷ΪÊý¾Ý¿â·ÃÎʵĽӿڣ¬Ö»ÐèÒªÒ»¸ö²»µ½3MµÄ¿ÉÖ´ÐÐÎļþ¾Í¿ÉÒÔ¶ÔÊý¾Ý¿â½øÐвÙ×÷£¬ÆäËûʲô¶¼Óð²×°¡£¸Ã°æ±¾ÊÇÔÚSQLProgress1.01.33»ù´¡ÉÏÐ޸ĵģ¬33ÊÇBD ......
replace¾ÍÊÇÒ»°ãÒâÒåÉϵÄ×Ö·û´®Ìæ»»£¬translateÖ»ÊÇÒ»¸ö×Ö·ûÌæ»»¶ÔÓ¦µÄÒ»¸ö×Ö·û£¬ÏÂÃæÓÐÊÖ²á˵Ã÷£¬»¹ÓÐÀý×Ó O(∩_∩)O¹þ¹þ~
REPLACE
Syntax
Purpose
REPLACE returns char with every occurrence of search_string replaced with replacement_string. If replacement_string is omitted or null, then all occu ......