Oracle ±íɾ³ý´óÁ¿Êý¾Ýºó²éѯ±äÂýÎÊÌâ
Oracle ±íɾ³ý´óÁ¿Êý¾Ýºó£¬¼´Ê¹±íÖÐÖ»Óм¸ÐмǼ£¬µ«ÓÃselect count(*) from table À´²éѯ·¢¾õ¶¼²»»áÂíÉϳöÀ´£¬ÔÒòÊǸñíµÄ¿Õ¼ä´óÁË£¬²éѯÆðÀ´ºÜÂý¡£½â¾öµÄ·½·¨ÊǰѸñíËùÕ¼Óõıí¿Õ¼äËõС£¬»òÕß˵Êͷűí¿Õ¼ä¡£
alter table XXXX move; ÕâÑù´¦Àíºó¾ÍÊÍ·ÅÁ˱í¿Õ¼äÁË¡£µ«ÊÇÊͷűí¿Õ¼äºó£¬±íµÄÐкÅrowid»á·¢Éú±ä»¯£¬¶ø»ùÓÚrowidµÄË÷ÒýÔò»á±ä³ÉÎÞЧ¡£Òò´Ë¸Ã²Ù×÷ºó±ØÐëÖؽ¨Ë÷Òý¡£·ñÔò»áÌáʾ“ORA-01502: Ë÷Òý'SMP.ITEMLOG_MID_IDX'»òÕâÀàË÷ÒýµÄ·ÖÇø´¦ÓÚ²»¿ÉÓÃ״̬” ¶øÖؽ¨Ë÷ÒýµÄ·½·¨µ±È»¿ÉÒÔÏÈdropµôÔÙcreate £¬µ«ÊÇÕâÑùÌ«Âé·³ÁË£¬ÓÃalter index XXX rebuild ÕâÑù×î¿ìÁË£¬²»»á¸Ä±äÔÀ´µÄË÷Òý½á¹¹¡£
Ïà¹ØÎĵµ£º
Èç¹ûÄãÊÇWINXP»òWIN2003µÄϵͳÖÐ×Ô´øµÄ·À»ðǽ,¿ÉÒÔÊÔÒ»ÏÂÒÔÏ·½·¨:
1.ÔÚ·À»ðǽµÄÀýÍâÖÐ,Ìí¼ÓORACLE.EXEÔËÐгÌÐò.(ÔÚoracle°²×°Ä¿Â¼ÕÒµ½binÎļþ¼ÐÖÐ)
2.ÔÙÔÚ·À»ðǽÀýÍâÖУ¬Ìí¼Ó¶Ë¿Ú1521¶Ë¿Ú¾ÍÑù¾ÖÓòÍøÄÚµÄÆäËû»úÆ÷¾Í¿ÉÒÔ·ÃÎÊÄãµÄORACLEÁË.
»òÕßÔڸ߼¶ÖÐ,Ñ¡Öе±Ç°Ê¹ÓõÄÍø¿¨,Ìí¼ÓIP,¶Ë¿ÚºÅ(1521),ÕâÑù,ÆäËû»úÆ÷Ò²¿ÉÒÔ·ÃÎ ......
¶ÔÓÚ Oracle µÄ rownum ÎÊÌ⣬ºÜ¶à×ÊÁ϶¼Ëµ²»Ö§³Ö>,>=,=,between...and£¬Ö»ÄÜÓÃÒÔÉÏ·ûºÅ(<¡¢<=¡¢!=)£¬²¢·Ç˵ÓÃ>,>=,=,between..and ʱ»áÌáʾSQLÓï·¨´íÎ󣬶øÊǾ³£ÊDz鲻³öÒ»Ìõ¼Ç¼À´£¬»¹»á³öÏÖËƺõÊÇĪÃûÆäÃîµÄ½á¹ûÀ´£¬ÆäʵÄúÖ»ÒªÀí½âºÃÁËÕâ¸ö rownum αÁеÄÒâÒå¾Í²»Ó¦¸Ã¸Ðµ½¾ªÆ棬ͬÑùÊÇαÁУ¬rownum Ó ......
OracleÊý¾Ý¿âϵͳ¸ù¾Ý³õʼ»¯²ÎÊýÎļþinit.oraÖÐÉèÖõIJÎÊýÀ´ÅäÖÃ×ÔÉíµÄÆô¶¯£¬Ã¿¸öʵÀýÔÚÆô¶¯Ö®Ç°£¬Ê×ÏȶÁÈ¡ÕâЩ²ÎÊýÎļþÖÐÉèÖõIJ»Í¬²ÎÊý¡£
OracleϵͳÖеIJÎÊý£¬¸ù¾ÝϵͳʹÓÃÇé¿ö¿ÉÒÔ¼òµ¥·ÖΪÁ½´óÀࣺ
ÆÕͨ²ÎÊý£ºÒ²¾ÍÊÇOracleϵͳÕý³£Ê¹ÓõÄһЩ²ÎÊý£¬
·Ç·²²ÎÊý£º°üÀ¨ÈýÖÖ£¬¹ýʱ²ÎÊý¡¢Ç¿µ÷²ÎÊýºÍÒþ²Ø²ÎÊý¡£
Ëæ×ÅOrac ......
DECODEº¯ÊýÊÇORACLE PL/SQLÊǹ¦ÄÜÇ¿´óµÄº¯ÊýÖ®Ò»£¬Ä¿Ç°»¹Ö»ÓÐORACLE¹«Ë¾µÄSQLÌṩÁ˴˺¯Êý£¬ÆäËûÊý¾Ý¿â³§É̵ÄSQLʵÏÖ»¹Ã»Óд˹¦ÄÜ¡£DECODEÓÐʲôÓÃ;ÄØ£¿ Ïȹ¹ÔìÒ»¸öÀý×Ó£¬¼ÙÉèÎÒÃÇÏë¸øÖÇÐÇÖ°Ô±¼Ó¹¤×Ê£¬Æä±ê×¼ÊÇ£º¹¤×ÊÔÚ8000ÔªÒÔϵĽ«¼Ó20£¥£»¹¤×ÊÔÚ8000ÔªÒÔÉϵļÓ15£¥£¬Í¨³£µÄ×ö·¨ÊÇ£¬ÏÈÑ¡³ö¼Ç¼ÖеŤ×Ê×Ö¶ÎÖµ? select s ......
°ÑÊý¾Ý´ÓÒ»¸ö±í¸´ÖƵ½ÁíÒ»¸ö±í£¬²åÈëÐÂÊý¾Ý»òÌæ»»µôÀÏÊý¾ÝÊÇÿһ¸öORACLE DBA¶¼»á¾³£Åöµ½µÄÎÊÌâ¡£ÔÚORACLE9iÒÔÇ°µÄÄê´ú£¬ÎÒÃÇÒªÏȲéÕÒÊÇ·ñ´æÔÚÀÏÊý¾Ý£¬Èç¹ûÓÐÓÃUPDATEÌæ»»£¬·ñÔòÓÃINSERTÓï¾ä²åÈ룬Æä¼äÉÙ²»ÁË»¹ÓÐһЩ±ê¼Ç±äÁ¿µÈµÈ£¬·±ËöµÄºÜ¡£ÏÖÔÚORACLE9iרΪÕâÖÖÇé¿öÌṩÁËMERGEÓï¾ä£¬Ê¹ÕâÒ»¹¤×÷±äµÃÒì³£ÇáËÉ£¬
MERGEÓï ......