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

Oracleѧϰ±Ê¼Çժ¼7

 ÓÃ;: <1>Ä£¿é»¯
<Àý×Ó> --¹«Ë¾µÄÔ±¹¤µÄ¹ÜÀí
         1.Ôö¼ÓÒ»¸öÔ±¹¤
         2.Ô±¹¤ÀëÖ°
Óô洢¹ý³ÌºÍº¯ÊýÀ´ÊµÏÖ
1.Ôö¼ÓÒ»¸öÔ±¹¤
create sequence seq1 start with 7935;
create or replace function insert_emp(
   enm emp.ename%type,  --Ô±¹¤µÄÃû×Ö
   ejob varchar2, --Ö°Îñ
   mgr number,   --Éϼ¶
   ehiredate date,--²Î¼Ó¹¤×÷ʱ¼ä
   esal number,  --¹¤×Ê
   ecomm number, --½òÌù
   dno number)         
return number
as
  a number;
begin
  --¹¤ºÅÀ´×ÔÐòÁÐ
  select seq1.nextval into a
  from dual;
  --Ôö¼ÓÁËÒ»¸öÔ±¹¤
  insert into emp values (
       a,enm,ejob,mgr,ehiredate,esal,ecomm,dno);
  return a;
end;               
2.Ô±¹¤ÀëÖ°
 create or replace procedure remove_emp(eno emp.empno%type)
 as
 begin
   delete from emp where empno = eno;
 end;
    
°ÑÕâ2¸ö¹¦ÄÜÉè¼Æ³ÉÒ»¸öpackage(°ü)
  °ü-- ˵Ã÷²¿·Ö + ʵÏÖ²¿·Ö
 ½¨Á¢ËµÃ÷²¿·Ö:
  create or replace package company_gl
  as
    --¼ÓÔ±¹¤
    function insert_emp( enm emp.ename%type,  --Ô±¹¤µÄÃû×Ö
   ejob varchar2, --Ö°Îñ
   mgr number,   --Éϼ¶
   ehiredate date,--²Î¼Ó¹¤×÷ʱ¼ä
   esal number,  --¹¤×Ê
   ecomm number, --½òÌù
   dno number) return number;
    --Ô±¹¤ÀëÖ°
    procedure remove_emp(eno emp.empno%type);
  end;   
 --ʵÏÖ²¿·Ö
  create or replace package body company_gl
  as
     function insert_emp(
   enm emp.ename%type,  --Ô±¹¤µÄÃû×Ö
   ejob var


Ïà¹ØÎĵµ£º

Oracleѧϰ±Ê¼Çժ¼3

 ¡¶1¡·DDLÓï¾ä(Êý¾Ý¶¨ÒåÓïÑÔ) Data Define Language
   create
   alter
   drop
   truncate ¿ªÍ·µÄÓï¾ä truncate table <±íÃû>
      Ìصã:<1>½¨Á¢ºÍÐÞ¸ÄÊý¾Ý¶ÔÏó
         &nb ......

MySQLºÍOracleµÄһЩ²Ù×÷Çø±ð

 ÓкܶàÓ¦ÓÃÏîÄ¿, ¸ÕÆð²½µÄʱºòÓÃMYSQLÊý¾Ý¿â»ù±¾ÉÏÄÜʵÏÖ¸÷ÖÖ¹¦ÄÜÐèÇó£¬Ëæ×ÅÓ¦ÓÃÓû§µÄÔö¶à£¬Êý¾ÝÁ¿µÄÔö¼Ó£¬MYSQL½¥½¥µØ³öÏÖ²»¿°ÖظºµÄÇé¿ö£ºÁ¬½ÓºÜÂýÉõÖÁå´»ú£¬ÓÚÊǾÍÓаÑÊý¾Ý´ÓMYSQLǨµ½ORACLEµÄÐèÇó£¬Ó¦ÓóÌÐòÒ²ÒªÏàÓ¦×öһЩÐ޸ġ£±¾ÈË×ܽá³öÒÔϼ¸µã×¢ÒâÊÂÏϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
1£® ×Ô¶¯Ôö³¤µÄÊý¾ ......

OracleʹÓõÄhintsµ÷Õû»úÖÆ

 
10gÊý¾Ý¿â½éÉÜ£º¿ÉÒÔʹÓøü¶àеÄoptimizer hintsÀ´¿ØÖÆÓÅ»¯ÐÐΪ¡£ÏÖÔÚÈÃÎÒÃÇ¿ìËÙ½âÎöÒ»ÏÂÕâЩǿ´óµÄÐÂhints:
spread_min_analysis

ʹÓÃÕâÒ»hint£¬Äã¿ÉÒÔºöÂÔһЩ¹ØÓÚÈçÏêϸµÄ¹ØϵÒÀÀµÍ¼·ÖÎöµÈµç×Ó±í¸ñµÄ±àÒëʱ¼äÓÅ»¯¹æÔò¡£ÆäËûµÄһЩÓÅ»¯£¬Èç´´½¨¹ýÂËÒÔÓÐÑ¡ÔñÐԵĶ¨Î»µç×Ó±í¸ñ·ÃÎʽṹ²¢ÏÞÖÆÐÞ¶©¹æÔòµÈ£¬µÃµ ......

OracleÊý¾Ý¿âµÄ±¸·Ý¼°»Ö¸´²ßÂÔÑо¿

1¡¢¶à¹¤Áª»úÖØ×÷ÈÕÖ¾Îļþ
¡¡¡¡Ã¿¸öÊý¾Ý¿âʵÀý¶¼ÓÐÆä×Ô¼ºµÄÁª»úÖØ×÷ÈÕÖ¾×飬ÔÚ²Ù×÷Êý¾Ý¿âʱ£¬OracleÊ×ÏȽ«Êý¾Ý¿âµÄÈ«²¿¸Ä±ä±£´æÔÚÖØ×÷ÈÕÖ¾»º³åÇøÖУ¬ËæºóÈÕÖ¾¼Ç¼Æ÷½ø³Ì£¨LGWR£©½«Êý¾Ý´Óϵͳ¹²ÓÃÇøSGA£¨System Global Area£©µÄÖØ×÷ÈÕÖ¾»º³åÇøдÈëÁª»úÖØ×÷ÈÕÖ¾Îļþ£¬ÔÚ´ÅÅ̱ÀÀ£»òʵÀýʧ°Üʱ£¬¿ÉÒÔͨ¹ýÓëÖ®Ïà¹ØµÄÁª»úÖØ×÷ÈÕÖ¾ ......

spring+hibernateÖд¦Àíoracle BLOB

 1¡¢ÅäÖÃhibernate£º
    1.1¡¢ÅäÖÃhibernateµÄ³Ö¾ÃÀàÎļþÖжÔÓ¦µÄ×Ö¶ÎΪbyte[]ÀàÐÍ
    2.2¡¢ÅäÖÃhibernateµÄÀàÓ³ÉäÎļþÖжÔÓ¦µÄ×Ö¶ÎtypeΪ 
            org.springframework.orm.hibernate3.support.BlobByteArray ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ