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

ÔÚoracleÖйØÓÚÊ÷µÄsql

±ítask£¬×Ö¶Îid_£¬name_
id_µÄÊý¾ÝÈçÏÂÐÎʽ£º
1
1.1
1.1.1
1.1.1.2
1.2
1.2.1
...
10
10.1
10.1.1
10.2.1
10.2.1.1
10.2.1.1.1
10.2.1.1.2
.......
×¢£º“.”±êʶ¸¸×ӵĹØÏµ¡£
ÏÖÔÚͨ¹ýid_²éѯÊ÷½á¹¹µÄЧ¹û£¬²¢ÇÒÖªµÀ´Ë½ÚµãÊÇ·ñΪҶ×Ó½Úµãleaf¡£¡££¿
Óï¾äÈçÏ£º
select
id_ ,
name_ ,
(select count(id_) from  task where t.id_= substr(id_,0,INSTR((id_),'.',-1)-1) )  as  leaf,connect_by_isleaf from  task t 
  start with  t.id_ ='5' connect by prior
  t.id_= substr(t.id_,0,INSTR((t.id_),'.',-1)-1) order by t.id_


Ïà¹ØÎĵµ£º

Oracle²é¿´Óû§Ëø±íÐÅÏ¢

select p.spid,
       a.serial#,
       c.object_name,
       b.session_id,
       b.oracle_username,
       b.os_user_name
  from v$proces ......

ORACLEÓÃLIMITʵÏÖÀàËÆ·ÖÒ³

Á·Ï°ÁËORACLEÀàËÆµÄ·ÖÒ³,Ä¿µÄ:ORACLEµÄLIMITʹÓÃ
declare
type name_arrary_type is varray(20) of varchar2(10);
name_arrary  name_arrary_type;
rowss int:=&ÊäÈëÒ³¼Ç¼Êý;
dpno int:=&ÊäÈ벿ÃźÅ;
v_count int:=0;
cursor  emp_cursor(dpno int) is select ename from emp where deptno=dpno; ......

RedHatAs5ÏÂOracleË«»úÈȱ¸£¨1£©

    ×î½üÒ»¸öÏîÄ¿µÄʵʩÐèÒªÓõ½
RedHatAs5.0
²Ù×÷ϵͳϵÄ
Oracle
Ë«»úÈȱ¸ÅäÖã¬Ô­ÒÔΪÓÐÉ豸³§ÉÌÒÔ¼°¹«Ë¾ÏµÍ³ÍøÂ粿µÄ¼¼ÊõÖ§³Ö£¬Ë«»úÈȱ¸¾ÍÊÇСÒâ˼£¬Ã»Ï뵽ʵʩ¹ý³ÌÖÐÅöµ½ÁËÐí¶àÆæ¹ÖµÄÎÊÌâ¡£¾­¹ý¶àÌìµÄ¹¥¹Ø£¬ÖÕÓÚÅäÖóɹ¦ÁË£¬¸Ð¾õÐÄÇéÌØ±ðÇáËÉ¡£¾­¹ýÁ½ÖܵÄʵʩ£¬ÎÒÒÔÒ»¸ö
Linux
²ËÄñµÄÉí·Ý£¬³õ²½Á ......

ORACLEÈÕÆÚʱ¼äº¯Êý´óÈ«

TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02   13:45:25ΪÀý)
  
        Year:     
        yy two digits Á½Î»Äê               ......

ORACLE ÖÐROWNUMÓ÷¨×ܽá!


¶ÔÓÚ Oracle µÄ rownum ÎÊÌ⣬ºÜ¶à×ÊÁ϶¼Ëµ²»Ö§³Ö>,>=,=,between...and£¬Ö»ÄÜÓÃÒÔÉÏ·ûºÅ(<¡¢<=¡¢!=)£¬²¢·Ç˵ÓÃ>,>=,=,between..and ʱ»áÌáʾSQLÓï·¨´íÎ󣬶øÊǾ­³£ÊDz鲻³öÒ»Ìõ¼Ç¼À´£¬»¹»á³öÏÖËÆºõÊÇĪÃûÆäÃîµÄ½á¹ûÀ´£¬ÆäʵÄúÖ»ÒªÀí½âºÃÁËÕâ¸ö rownum αÁеÄÒâÒå¾Í²»Ó¦¸Ã¸Ðµ½¾ªÆæ£¬Í¬ÑùÊÇαÁУ¬rownum ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ