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

ORACLE ÐÐÁÐת»»Í¨Óô洢¹ý³Ì£¬ÒѾ­×ª»»µÄMSSQL°æ±¾

ÏÂÃæÊÇORACLEÐÐÁÐת»»Í¨Óô洢¹ý³Ì£º
1¡¢
Function Fun_Split_Str(p_Str Varchar2, p_Division Varchar2, p_Seq Int)
    Return Varchar2 Is
    v_First Int;
    v_Last  Int;
  Begin
    If p_Seq < 1 Then
      Return Null;
    End If;
    If p_Seq = 1 Then
      If Instr(p_Str, p_Division, 1, p_Seq) = 0 Then
        Return p_Str;
      Else
        Return Substr(p_Str, 1, Instr(p_Str, p_Division, 1) - 1);
      End If;
    Else
      v_First := Instr(p_Str, p_Division, 1, p_Seq - 1);
      v_Last  := Instr(p_Str, p_Division, 1, p_Seq);
      If (v_Last = 0) Then
        If (v_First > 0) Then
          Return Substr(p_Str, v_First + 1);
        Else
          Return Null;
        End If;
      Else
        Return Substr(p_Str, v_First + 1, v_Last - v_First - 1);
      End If;
    End If;
  End Fun_Split_Str;
  /*
  */
  Procedure Pro_Rows_Column(p_Table      In Varchar2,
                            p_Keep_Cols  In Varchar2,
                            p_Pivot_Cols In Varcha


Ïà¹ØÎĵµ£º

Oracle µÝ¹é²éѯ

create table tree_table 
(
id number,
pId number,
orderNumber number,
name varchar2(255)
)
select tt.*
from tree_table tt
start with tt.pId = 0
connect by prior tt.id = ttd.pId
order siblings by orderNumber  ......

Oracle´´½¨±í¿Õ¼ä¡¢´´½¨Óû§ÒÔ¼°ÊÚȨ¡¢²é¿´È¨ÏÞ

´´½¨ÁÙʱ±í¿Õ¼ä
CREATE TEMPORARY TABLESPACE test_temp
TEMPFILE 'C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf'
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
´´½¨Óû§±í¿Õ¼ä
CREATE TABLESPACE test_data
LOGGING
DATAFILE 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TE ......

oracle10g SQL ¸ú×Ù

1.¼¤»îSQL¸ú×Ù
   ´Óoracle10gÒÔºóÌṩÁËеķ½·¨¼¤»îSQLµÄ¸ú×Ù£¬¼´ÊÇʹÓÃdbms_monitor°üÀ´¿ªÆô»ò¹Ø±ÕSQL¸ú×Ù¡£
   ֮ǰ¾É·½·¨ÊÇʹÓà alter session set events ..  »òÕßʹÓÃdbms_system.set_ev·½Ê½
   ʹÓÃdbms_monitor°ü¿ÉÒÔÔڻỰ£¬¿Í»§¶Ë£¬×é¼þÒÔ¼°Êý¾Ý¿âËĸö²ã¼¶¿ªÆôSQLµÄ¸ú×Ù¡ ......

µ¼ÈëOracleʵÀý

--´´½¨Óû§
create user iagent identified by ia
--profile default 
default  tablespace users
temporary tablespace temp;
--account unlock;
 
--ɾ³ýÓû§
drop user iagent cascade;
--ÐÞ¸ÄÓû§ÃÜÂë
  alter  user  iagent  identified   by ia;
--¸ø´´½¨µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ