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

oracle Function


5.µ÷Óú¯ÊýFN_ADDONE
--------------------
SQL> SET SERVEROUTPUT ON
SQL> DECLARE CNUM NUMBER;
  2  BEGIN
  3     CNUM := USER1_ADB.FN_ADDONE(3);
  4     DBMS_OUTPUT.PUT_LINE('CNUM = ' || CNUM);
  5  END;
  6  /
CNUM = 4
PL/SQL ¹ý³ÌÒѳɹ¦Íê³É¡£
6.ɾ³ýº¯ÊýFN_ADDONE
--------------------
SQL> DROP FUNCTION USER1_ADB.FN_ADDONE;


Ïà¹ØÎĵµ£º

½â¶ÁOracleÖ®Ò»£º°²×°Oracle

°²×°¸ÅÊö
±¾Æª½éÉÜÈçºÎ°²×°OracleÈí¼þ£¬Òª°²×°OracleÈí¼þÍƼöʹÓÃOracleͨÓð²×°¡£OracleͨÓð²×°³ÌÐòÊÇÒ»¸öͼÐÎÓû§½çÃ棨GUI£©¹¤¾ß£¬Ê¹Äú¿ÉÒԲ鿴OracleÈí¼þÒÑÔÚ¼ÆËã»úÉÏ°²×°»ò°²×°ÐµÄOracleÈí¼þ£¬²¢Ð¶ÔØOracleÈí¼þ£¬ÒÔϽ«Ð­ÖúÄúÍê³É°²×°¹ý³Ì¡£
¼ì²éÏȾöÌõ¼þ
°²×°³ÌÐò֮ǰ£¬Oracle¹«Ë¾Ö´ÐÐÒ»¸öÏȾöÌõ¼þ¼ì²éµÄ×Ô¶¯±àº ......

OracleÇý¶¯classes12.jar Óëojdbc14.jarµÄÇø±ð

ÒÔÏÂÊÇOracle JDBC¹Ù·½ÎĵµµÄ˵·¨£º
Ò²¾ÍÊÇËæ±ã·­ÒëһϾÍÀí½âÁË¡£
JDBC Thin for All Platforms
classes12.jar (1,600,090 bytes) - for use with JDK 1.2 and JDK 1.3
Ôڵͼ¶JDK°æ±¾1.2Óë1.3ÖÐʹÓõÄÇý¶¯£¬ËäȻʵ¼ÊÉÏÔÚ1.4£¬1.5ÖÐʹÓô󲿷ÖÇé¿öÒ²ÊÇOKµÄ
classes12_g.jar (2,044,594 bytes) - same as classes12.j ......

¹ØÓÚoracleµÄ±í¿Õ¼ä£¬·ÖÇø±í£¬ÒÔ¼°Ë÷ÒýµÄ×ܽá


±í¿Õ¼ä£º
OracleµÄUNDOTBS01.DBFÎļþÌ«´óµÄ½â¾ö°ì·¨
1¡¢.½ûÖ¹undo tablespace×Ô¶¯Ôö³¤
alter   database   datafile   'full_path\undotbs01.dbf'   autoextend   off;
2.-- ´´½¨Ò»¸öеÄС¿Õ¼äµÄundo tablespace
create undo tablespace undotBS2 datafile ......

oracle µÄ left/right joinÓë(+)µÄÒ»¸öÇø±ð

»ù±¾´ÓÀ´²»ÓÃleft/right join
Ò»¸öÏîÄ¿±»ÆÈÒªÓñðÈËдµÄ sql
±¾´òËã¸ÄдһÏ£¬Ìá¸ßЧÂÊ
·¢ÏÖ£º
¡¾1¡¿
select * from  a
left outer join  b on a.id= b.id AND ...1...
 where ...2...
Óë
¡¾2¡¿
select * from  a , b 
 where a.id= b.id(+)
A ......

OracleÖÐstart with...connect by prior×Ó¾äÓ÷¨

connect by Êǽṹ»¯²éѯÖÐÓõ½µÄ£¬Æä»ù±¾Óï·¨ÊÇ£º
select ... from tablename start with Ìõ¼þ1
connect by Ìõ¼þ2
where Ìõ¼þ3;
Àý£º
select * from table
start with org_id = 'HBHqfWGWPy'
connect by prior org_id = parent_id;
¼òµ¥ËµÀ´Êǽ«Ò»¸öÊ÷×´½á¹¹´æ´¢ÔÚÒ»ÕűíÀ±ÈÈçÒ»¸ö±íÖдæÔÚÁ½¸ö×Ö¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ