Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¡¾×ª¡¿ORACLE BLOB BFILE ÎļþµÄ¼Èë¼°¶ÁÈ¡

 Èç¹ûÄã½Ó´¥¹ýmysqlµÄ»°Ò»¶¨¶ÔmysqlµÄtextºÍblob²»»áÄ°Éú£¬ÔÚmysqlÖÐÊÇÖ±½Ó²Ù×÷textºÍblobµÄ¡£µ«ÊÇÔÚoracleÖУ¬Ëü°Ñlob×öΪһÖÖÌØÊâµÄ×ֶΣ¬²»ÄÜÖ±½Ó½øÐвÙ×÷--±ÈÈç²»ÄÜÖ±½Ó²åÈëµ½lob×Ö¶ÎÖУ¬Ò²²»ÄÜÓÃlike²éѯµÈµÈ¡£   
  ÕâÀïÊÇÎÒ±£´æµÄһƪÕâ·½ÃæµÄÎÄÕ£¬Ô­ÎÄ°á¹ýÀ´£¬ÓÉÓÚ±£´æµÄʱºòÖ»ÊÇÈ¡ÁËÒ»²¿·Ö£¬Ã»Í·Ã»Î²µÄ£¬ËùÒÔû·¨ÕÒµ½Ô­À´µÄ³ö´¦¡£   
    
  ²»ÄÜÖ±½ÓÓÃINSERTÓï¾äÏòLOB×Ö¶ÎÖвåÈëÖµ¡£Ò»°ãÇé¿öÏ£¬ÓÐÈçϵļ¸²½£º     
  1   ÏÈ·ÖÎöÒ»¸öINSERTÓï¾ä£¬·µ»ØÒ»¸öLOBµÄÃèÊö·û     
  2   ÓÃOCIº¯ÊýÉú³ÉÒ»¸ö±¾µØµÄLOB¶ÔÏó     
  3   ½«LOB¶ÔÏó°ó¶¨µ½LOBÃèÊö·ûÉÏ     
  4   Ö´ÐÐINSERTÓï¾ä     
  5   ¸øLOB¶ÔÏó¸³Öµ     
  6   ÊÍ·ÅLOB¶ÔÏóºÍSQLÓï¾ä¾ä±ú     
    
  ÏÂÃæµÄÕâ¸öÀý×ÓÊÇ°ÑÓû§ÉÏ´«µÄͼƬÎļþ´æ·Åµ½BLOB£¨»òBFILEÖУ¬²Ù×÷ÉÔÓв»Í¬£©ÖС£     
  Ê×ÏÈÒª½¨Ò»¸ö±í£¬½á¹¹ÈçÏ£º  
  CREATE   TABLE   PICTURES   (     
  ID   NUMBER,     
  DESCRIPTION   VARCHAR2(100),     
  MIME   VARCHAR2(128),     
  PICTURE   BLOB     
  );  
  Èç¹ûҪʵÏÖIDµÄ×Ô¶¯Ôö¼Ó£¬ÔÙ½¨Ò»¸öSEQUENCE:     
  CREATE   SEQUENCE   PIC_SEQ;     
    
  È»ºóÊÇÓÃÀ´´¦ÀíÊý¾ÝµÄPHP³ÌÐò´úÂë¡£     
  <?php     
    
  //½¨Á¢OracleÊý¾Ý¿âÁ¬½Ó     
  $conn   =   OCILogon($user,   $password,   $SID);     
  //Ìá½»SQLÓï¾ä¸øOracle     
  //ÔÚÕâÀïҪעÒâµÄÁ½µã£ºÒ»ÊÇÓÃEMPTY_BLOB()º¯Êý¡£ÕâÊÇOracleµÄÄÚ²¿º¯Êý£¬·µ»ØÒ»¸öLOBµÄ¶¨Î»·û¡£ÔÚ²åÈëLOBʱ£¬Ö»ÄÜÓÃÕâ¸ö°ì·¨ÏÈÉú³ÉÒ»¸ö¿ÕµÄLOB¶¨Î»·û£¬È»ºó¶ÔÕâ¸ö¶¨Î»·û½øÐвÙ×÷¡£EMPTY_BLOB()º¯ÊýÊÇÕë¶ÔBLO


Ïà¹ØÎĵµ£º

Oracle±í¿Õ¼äµÄ¹ÜÀí

 Oracle±í¿Õ¼äµÄ¹ÜÀí
1.´´½¨±í¿Õ¼ä
  //´´½¨ÁÙʱ±í¿Õ¼ä
 create temporary tablespace test_temp
 tempfile 'E:\oracle\product\10.2.0\oradata\testserver\test_temp01.dbf'
 size 32m
 autoextend on
 next 32m maxsize 2048m
 extent management local;
&nbs ......

Oracle ¿Í»§¶ËÁ¬½Ó·þÎñÆ÷³£¼ûÎÊÌâÖ®

½ñÌì°²×°Èí¼þÒ»Ö±ÔÚ²âÊÔÁ´½Ó²»ÄÜͨ¹ý£¬³öÏÖORA-12154: TNS: could not resolve service name£¬ºóÀ´²Å·¢ÏÖÊÇtnsnames.oraÖÐÓÐÎó¡£²éÕÒÍøÉϵÄ×ÊÁÏ£¬¼Ç¼ÏÂÀ´¡£
ÒªÅųý¿Í»§¶ËÓë·þÎñÆ÷¶ËµÄÁ¬½ÓÎÊÌ⣬Ê×Ïȼì²é¿Í»§¶ËÅäÖÃÊÇ·ñÕýÈ·(¿Í»§¶ËÅäÖñØÐëÓëÊý¾Ý¿â·þÎñÆ÷¶Ë¼àÌýÅäÖÃÒ»ÖÂ)£¬ÔÙ¸ù¾Ý´íÎóÌáʾ½â¾ö¡£ÏÂÃæÁгö¼¸ÖÖ³£¼ûµÄÁ¬½ÓÎÊÌâ ......

Oracle³õѧ±Ê¼Ç(1)

 
°²×°Oracleºó£¬¸ü¸ÄWindows¼ÆËã»úÃû£¬µ¼Ö²¿·ÖOracleµÚÈý·½¹¤¾ß£¬Èç:PLSQL
DeveloperÎÞ·¨µÇ½£¬²¢ÌáʾORA-12541:TNS:no listener»òORA-12547:TNS:¶ªÊ§ÁªÏµµÈ´íÎóÐÅÏ¢µÄ½â¾ö·½·¨¡£
´ð£º´ÓOracleµÄ´íÎóÌáʾÀ´¿´,ÊÇ˵TNS:no listener
£¬¹À¼ÆÊÇijÖÖ·þÎñûÓÐÆô¶¯£¬´ò¿ªwindows¹ÜÀí¹¤¾ß->·þÎñ£¬Ò»¿´£¬ÓÐÒ»¸öOracle ......

OracleÖеÄprofile

 ¡¡1¡¢Ä¿µÄ£º
¡¡¡¡OracleϵͳÖеÄprofile¿ÉÒÔÓÃÒÔ¶ÔÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´½øÕ¹ÏÞÖÆ£¬ÔËÓÃCreate ProfileÏÂÁî´´°ìÒ»¸öProfile£¬ÓÃËüÀ´¶ÒÏÖ¶ÔÊý¾Ý¿â×ÊÔ´µÄÏÞÖÆÔËÓã¬Èç¹û°Ñ¸Ãprofile·ÖÅä¸øÓû§£¬Ôò¸ÃÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´¶¼ÔÚ¸ÃprofileµÄÏÞÖÆÒÔÄÚ¡£
¡¡¡¡2¡¢Ìõ¼þ£º
¡¡¡¡´´ÉèprofileÎñ±ØÒªÓÐCREATE PROFILEµÄÏµÍ ......

¼Ç¼һЩsqlÓï¾äoracleµÄ

 select d.code,d.name, sum(w.weight) weight,round(avg(w.price),2) price,sum(w.money) money
from weight_info w left outer join t_dict d on w.productcode=d.code left outer  join t_balancecode b on w.balancecode=b.balancecode where 1=1 and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', ' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ