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

Oracle WrapʹÓ÷½·¨

OracleÌṩWrap¹¤¾ß£¬¿ÉÒÔÓÃÓÚ¼ÓÃÜÄãµÄPackageµÈ.
²»¹ýÐèҪעÒâµÄÊÇ£¬¼ÓÃܺóµÄ´úÂëÎÞ·¨½âÃÜ£¬ÄãÐèÒª±£¹ÜºÃÄãµÄÔ´´úÂë¡£
ÒÔÏÂÊǸöÀý×Ó:
1.Ô´´úÂë
create or replace function get_rowid
(l_rowid in varchar2)
return varchar2
is
ls_my_rowid varchar2(200);
rowid_type number;
object_number number;
relative_fno number;
block_number number;
row_number number;
begin
dbms_rowid.rowid_info(l_rowid,rowid_type,object_number,relative_fno, block_number, row_number);
ls_my_rowid := 'Object# is :'||to_char(object_number)||chr(10)||
'Relative_fno is :'||to_char(relative_fno)||chr(10)||
'Block number is :'||to_char(block_number)||chr(10)||
'Row number is :'||to_char(row_number);
return ls_my_rowid ;
end;
/
2.´úÂ빦ÄܲâÊÔ
[oracle@jumper tools]$ sqlplus scott/tiger
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Nov 15 21:56:36 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
SQL> @f_get_rowid
Function created.
SQL> select rowid from dept where deptno=10;
ROWID
------------------
AAABiPAABAAAFRSAAA
SQL> select get_rowid('AAABiPAABAAAFRSAAA') from dual;
GET_ROWID('AAABIPAABAAAFRSAAA')
------------------------------------------------------------------
Object# is :6287
Relative_fno is :1
Block number is :21586
Row number is :0
SQL> !
[oracle@jumper tools]$ ls
ct.sql ddlt.sql f_get_rowid.sql getevent.sql
3.ʹÓÃwrap¼ÓÃܼ°¼ÓÃܺóµÄ´úÂë
[oracle@jumper tools]$ wrap iname=f_get_rowid.sql oname=f_get_rowid.plb
PL/SQL Wrapper: Release 9.2.0.4.0- Production on Mon Nov 15 21:59:39 2004
Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.
Processing f_get_ro


Ïà¹ØÎĵµ£º

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

 
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;
¼òµ ......

Oracle¿ØÖÆÎļþ³£ÓòÙ×÷

ÏÞÖÆ¿ØÖÆÎļþµÄ´óС
a.)²éѯ¿É¸´Óò¿·ÖµÄ±£´æÌìÊý(²»ÄÜÖ±½Ó¿ØÖÆ´óС,±£´æÌìÊýÔ½´óÊý¾ÝÔ½¶à)
SELECT name,value from v$parameter WHERE name = 'control_file_record_keep_time';

b.)ÉèÖÿɸ´Óò¿·Ö±£´æʱ¼ä
ALTER SYSTEM SET CONTROL_FILE_RECORD_KEEP_TIME = 14;
......

oracle±í·ÖÇøÏê½â

http://tianzt.blog.51cto.com/459544/171759
 ´ËÎÄ´ÓÒÔϼ¸¸ö·½ÃæÀ´ÕûÀí¹ØÓÚ·ÖÇø±íµÄ¸ÅÄî¼°²Ù×÷:
        1.±í¿Õ¼ä¼°·ÖÇø±íµÄ¸ÅÄî
        2.±í·ÖÇøµÄ¾ßÌå×÷ÓÃ
        3.±í·ÖÇøµÄÓÅȱµã
 &nbs ......

ORACLEÈý²ãǶÌ×ʵÏÖ·ÖÒ³¹¦ÄܺÍROWNUMµÄʹÓÃ

(Ò»)ʵÏÖ·ÖÒ³¼°ÐÔÄÜ
OracleµÄ·ÖÒ³²éѯÓï¾ä»ù±¾ÉÏ¿ÉÒÔ°´ÕÕ±¾Îĸø³öµÄ¸ñʽÀ´½øÐÐÌ×Óá£
·ÖÒ³²éѯ¸ñʽ£º
SELECT * from
(
SELECT A.*, ROWNUM RN
from (SELECT * from TABLE_NAME) A
WHERE ROWNUM <= 40
)
WHERE RN >= 21
ÆäÖÐ×îÄÚ²ãµÄ²éѯSELECT * from TABLE_NAME±íʾ²»½øÐз­Ò³µÄԭʼ²éѯÓï¾ä¡£ROWNUM & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ