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

OracleµÝ¹é²éѯ

ÓеÄÇé¿öÏ£¬ÎÒÃÇÐèÒªÓõݹéµÄ·½·¨ÕûÀíÊý¾Ý£¬Õâ²Å³ÌÐòÖкÜÈÝÒ××öµ½£¬µ«ÊÇÔÚÊý¾Ý¿âÖУ¬ÓÃSQLÓï¾äÔõôʵÏÖ£¿ÏÂÃæÎÒÒÔ×îµäÐ͵ÄÊ÷ÐνṹÀ´ËµÃ÷ÏÂÈçºÎÔÚOracleʹÓõݹé²éѯ¡£
    ΪÁË˵Ã÷·½±ã£¬´´½¨Ò»ÕÅÊý¾Ý¿â±í£¬ÓÃÓÚ´æ´¢Ò»¸ö¼òµ¥µÄÊ÷Ðνṹ
Sql´úÂë
create table TEST_TREE   
(   
  ID   NUMBER,   
  PID  NUMBER,   
  IND  NUMBER,   
  NAME VARCHAR2(32)   
)  
create table TEST_TREE
(
ID NUMBER,
PID NUMBER,
IND NUMBER,
NAME VARCHAR2(32)
)
    IDÊÇÖ÷¼ü£¬PIDÊǸ¸½ÚµãID£¬INDÊÇÅÅÐò×ֶΣ¬NAMEÊǽڵãÃû³Æ¡£³õʼ»¯¼¸Ìõ²âÊÔÊý¾Ý¡£
IDPIDINDNAME
1
0
1
¸ù½Úµã
2
1
1
Ò»¼¶²Ëµ¥1
3
1
2
Ò»¼¶²Ëµ¥2
4
1
2
Ò»¼¶²Ëµ¥3
5
2
1
Ò»¼¶1×Ó1
6
2
2
Ò»¼¶1×Ó2
7
4
1
Ò»¼¶3×Ó1
8
4
2
Ò»¼¶3×Ó2
9
4
3
Ò»¼¶3×Ó3
10
4
0
Ò»¼¶3×Ó0
Ò»¡¢»ù±¾Ê¹Óãº
    ÔÚOracleÖУ¬µÝ¹é²éѯҪÓõ½start   with ¡£¡£¡£¡£connect   by   prior¡£¡£¡£
    ¾ßÌå¸ñʽÊÇ£º
Sql´úÂë
SELECT column  
from table_name   
START WITH column=value   
CONNECT BY PRIOR ¸¸Ö÷¼ü=×ÓÍâ¼ü  
SELECT column
from table_name
START WITH column=value
CONNECT BY PRIOR ¸¸Ö÷¼ü=×ÓÍâ¼ü
    ¶ÔÓÚ±¾ÀýÀ´Ëµ£¬¾ÍÊÇ£º
Sql´úÂë
select   d.*   from  test_tree d    
  start   with   d.pid=0   
  connect   by   prior   d.id=d.pid   
select d.* from test_tree d
start with d.pid=0
connect by prior d.id=d.pid
   ²éѯ½á¹ûÈçÏ£º
IDPIDINDNAME
1
0
1
¸ù½Úµã
2
1
1
Ò»¼¶²Ëµ¥1
5
2
1
Ò»¼¶1×Ó1
6
2
2
Ò»¼¶1×Ó2
3
1
2
Ò»¼¶²Ëµ¥2
4
1
2
Ò»¼¶²Ëµ¥3
7
4
1
Ò»¼¶3×Ó1
8
4
2
Ò


Ïà¹ØÎĵµ£º

Oracle³£ÓõÄÊý¾Ý¿â×Ö¶ÎÀàÐÍÈçÏ£º


×Ö¶ÎÀàÐÍ
ÖÐÎÄ˵Ã÷
ÏÞÖÆÌõ¼þ
ÆäËü˵Ã÷
CHAR
¹Ì¶¨³¤¶È×Ö·û´®
×î´ó³¤¶È2000 bytes
 
VARCHAR2
¿É±ä³¤¶ÈµÄ×Ö·û´®
×î´ó³¤¶È4000 bytes
¿É×öË÷ÒýµÄ×î´ó³¤¶È749
NCHAR
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´®
×î´ó³¤¶È2000 bytes
 
NVARCHAR2
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¿É±ä³¤¶È×Ö·û´®
×î´ó³¤¶È4000 bytes
  ......

oracle¾ÓÈ»Äܵ÷ÓÃjava³ÌÐò

ÒÔÇ°Ö»ÖªµÀjavaÄܵ÷ÓÃoracle´æ´¢¹ý³ÌºÍº¯Êý£¬µ«½ñÌìÎÒ·¢ÏÖÔ­À´oracleÒ²¿ÉÒÔµ÷ÓÃjava
²âÊÔ»·¾³oracle 10g
call dbms_java.set_output(5000);
--Ê×ÏÈÔÚoracleÖбàÒëjavaÎļþ ÒÔÏÂÊǸö¼òµ¥µÄ
create or replace and compile java source named helloworld as
public     class   hellowor ......

.batÆô¶¯Êý¾Ý¿â·þÎñ(MSSQL,Oracle)

 @echo off
:dosmenu
REM Ñ¡Ôñ²Ëµ¥
echo  Windows ·þÎñÆô¶¯»ò¹Ø±Õ By hope 2008Äê2ÔÂ7ÈÕ     
echo.
echo [1]Æô¶¯Sql Server2005   [2]¹Ø±ÕSql Server2005
echo [3]Æô¶¯Oracle9i         [4]¹Ø±ÕOracle9i
echo.
echo  ......

oracle Ó¦ÓóÌÐòÐÔÄÜ·ÖÎö

²é¿´sessionµÈ´ýʼþ£º
        select sid,event from v$session_wait where event not like 'rdbms%' and event not like 'SQL*Net message%';
°´pid²é¿´ÕýÔÚÖ´ÐеijÌÐò£º
        select sid,program from v$session b where paddr in (selec ......

OracleÈÏÖ¤½éÉÜ

ORACLEÅàѵ(OCA)ÈÏÖ¤½éÉÜ 
Oracle10g Certified Associate (OCA) Oracle ÈÏ֤רԱ¡£
¿¼ÊԳɼ¨Í¨¹ýÄÜ»ñµÃOracle¹«Ë¾ÎªÄú°ä·¢µÄÈ«ÇòÈÏÖ¤µÄÓ¢ÎÄOCAÖ¤Êé¡£OCAÓÉOracle¹«Ë¾³öÌâ¡£
¸ÃÖ¤Êé¿É×÷Ϊ¸÷ÆóÊÂÒµµ¥Î»Êý¾Ý¿â¹ÜÀíÈËÔ±ÉϸڵÄÒÀ¾Ý¡£
Ä¿Ç°ÒѳÉΪ¸÷IT¹«Ë¾¼°Ïà¹ØÆóÒµÕùÏྺƸµÄÊý¾Ý¿â¹ÜÀíά»¤È˲ţ¬ÊÇÊý¾Ý¿âά»¤¹ÜÀíÈËÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ