ORACLE SQLÐÔÄÜÓÅ»¯´ó×ܽá
ORACLE SQLÐÔÄÜÓÅ»¯´ó×ܽá
1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
" ?; J) n+ v8 J- v" q OracleµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£¼ÙÈçÓÐ3¸öÒÔÉϵıíÁ¬½Ó²éѯ, ÄǾÍÐèҪѡÔñ½»²æ±í(intersection table)×÷Ϊ»ù´¡±í, ½»²æ±íÊÇÖ¸ÄǸö±»ÆäËû±íËùÒýÓõıí.
7 Y6 A% _; P7 R$ K8 k+ i' B2 G£¨2£© WHERE×Ó¾äÖеÄÁ¬½Ó˳Ðò£®£º 7 _' p! V& j0 t
ORACLE²ÉÓÃ×Ô϶øÉϵÄ˳Ðò½âÎöWHERE×Ó¾ä,¸ù¾ÝÕâ¸öÔÀí,±íÖ®¼äµÄÁ¬½Ó±ØÐëдÔÚÆäËûWHEREÌõ¼þ֮ǰ, ÄÇЩ¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐëдÔÚWHERE×Ó¾äµÄĩβ.
0 \ _- K* U7 q3 A- v G£¨3£© SELECT×Ó¾äÖбÜÃâʹÓà ‘ * ‘£º " S. l, j9 `4 ^& Y7 K$ A
ORACLEÔÚ½âÎöµÄ¹ý³ÌÖÐ, »á½«'*' ÒÀ´Îת»»³ÉËùÓеÄÁÐÃû, Õâ¸ö¹¤×÷ÊÇͨ¹ý²éѯÊý¾Ý×ÖµäÍê³ÉµÄ, ÕâÒâζ׎«ºÄ·Ñ¸ü¶àµÄʱ¼ä / a" Q! e3 U2 s8 e+ S4 T
£¨4£© ¼õÉÙ·ÃÎÊÊý¾Ý¿âµÄ´ÎÊý£º 8 d0 y! R/ w! y. D8 t e9 [7 I' ]# s
ORACLEÔÚÄÚ²¿Ö´ÐÐÁËÐí¶à¹¤×÷: ½âÎöSQLÓï¾ä, ¹ÀËãË÷ÒýµÄÀûÓÃÂÊ, °ó¶¨±äÁ¿ , ¶ÁÊý¾Ý¿éµÈ£» ) T0 @ M; r( k8 H) @$ h
£¨5£© ÔÚSQL*Plus , SQL*FormsºÍPro*CÖÐÖØÐÂÉèÖÃARRAYSIZE²ÎÊý, ¿ÉÒÔÔö¼Óÿ´ÎÊý¾Ý¿â·ÃÎʵļìË÷Êý¾ÝÁ¿ ,½¨ÒéֵΪ200 8 u% p8 @$ p9 t2 e' }4 B# }
£¨6£© ʹÓÃDECODEº¯ÊýÀ´¼õÉÙ´¦Àíʱ¼ä£º
8 i- k$ O- d& k/ Q ʹÓÃDECODEº¯Êý¿ÉÒÔ±ÜÃâÖظ´É¨ÃèÏàͬ¼Ç¼»òÖظ´Á¬½ÓÏàͬµÄ±í.
$ L; z2 I g" x! s. r! E£¨7£© ÕûºÏ¼òµ¥,ÎÞ¹ØÁªµÄÊý¾Ý¿â·ÃÎÊ£º
I# L8 o9 F9 W7 i2 i3 n0 a" i ¼ÙÈçÄãÓм¸¸ö¼òµ¥µÄÊý¾Ý¿â²éѯÓï¾ä,Äã¿ÉÒÔ°ÑËüÃÇÕûºÏµ½Ò»¸ö²éѯÖÐ(¼´Ê¹ËüÃÇÖ®¼äûÓйØϵ)
/ O3 W+ r; ^ t; s; E* t1 U' P£¨8£© ɾ³ýÖظ´¼Ç¼£º 8 v P- d3 o$ z
×î¸ßЧµÄɾ³ýÖظ´¼Ç¼·½·¨ ( ÒòΪʹÓÃÁËROWID)Àý×Ó£º
1 K5 I3 Y: X6 a ]8 PDELETE from EMP E WHERE E.ROWID > (SELECT MIN(X.ROWID) / J5 ]1 Z7 x/ {0 K
from EMP X WHERE X.EMP_NO = E.EMP_NO); $ b w: W3 J9 i/ Z) ^
£¨9£© ÓÃTRUNCATEÌæ´úDELETE£º 9 y6 {7 l'
Ïà¹ØÎĵµ£º
ORACLE±¸·Ý²ßÂÔ(ORACLE BACKUP STRATEGY)
2007Äê11ÔÂ02ÈÕ ÐÇÆÚÎå 16:03
¸ÅÒª
1¡¢Á˽âʲôÊDZ¸·Ý
2¡¢Á˽ⱸ·ÝµÄÖØÒªÐÔ
3¡¢Àí½âÊý¾Ý¿âµÄÁ½ÖÖÔËÐз½Ê½
4¡¢Àí½â²»Í¬µÄ±¸·Ý·½Ê½¼°ÆäÇø±ð
5¡¢Á˽âÕýÈ·µÄ±¸·Ý²ßÂÔ¼°ÆäºÃ´¦
Ò»¡¢Á˽ⱸ·ÝµÄÖØÒªÐÔ
¿ÉÒÔ˵£¬´Ó¼ÆËã»úϵͳ³öÊÀµÄÄÇÌìÆ𣬾ÍÓÐÁ˱¸·ÝÕâ¸ö¸ÅÄ ......
ÏÂÔصØÖ·£º
http://www.itsoba.com/Article.asp?id=847
ÊÓƵ½éÉÜ£º
±¾Ì×ORACLEÊÓƵ½Ì³ÌΪ´«ÖDz¥¿ÍÄÚ²¿¾µä½ÌѧÊÓƵµÄÒ»¼¯£¬ºóÐøÊÓƵÕýÔÚ¼ÖƺÍÕûÀíÖУ¬¾´Çë¹Ø×¢¡£
½²Ê¦½éÉÜ£º
ÍõÖιú£¬ÓжàÄêÈí¼þ¿ª·¢¾ÑéºÍ½Ìѧ¾Ñ飬ÏȺóÔÚ¶à¼ÒÈí¼þ¹«Ë¾µ£ÈÎÈí¼þ¹¤³Ìʦ¡¢ÏîÄ¿¾Àí£¬¾«Í¨J2SE¡¢J2ME¡¢J2EE¡¢Linux¡¢Oracle¡¢SqlS ......
ת×Ô£ºhttp://topic.csdn.net/u/20100109/09/70f82fb7-eabc-4140-9573-5f8395e0f62e.html
²éѯËÙ¶ÈÂýµÄÔÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ£º
¡¡¡¡1¡¢Ã»ÓÐË÷Òý»òÕßûÓÐÓõ½Ë÷Òý(ÕâÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐòÉè¼ÆµÄȱÏÝ)
¡¡¡¡2¡¢I/OÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£
¡¡¡¡3¡¢Ã»Óд´½¨¼ÆËãÁе¼Ö²éѯ²»ÓÅ»¯¡£
¡¡¡¡4¡¢ÄÚ´æ²»×ã
¡¡¡ ......
a.Êý¾Ý¿â»ù´¡
i.¸ÅÄ±í¼°Ïà¹Ø²Ù×÷¶ÔÏóµÄ¼¯ºÏ£¨Ö÷Êý¾ÝÎļþmdf£¬¶þ¼¶Êý¾ÝÎļþndf£¬ÈÕÖ¾ldf£©
ii.×é³É£ºÏµÍ³£º master(¼Ç¼ÁËËùÓеķþÎñÆ÷ϵͳÐÅÏ¢)
,model£¨¼Ç¼ÁËËùÓÐÁÙʱ¼Ç¼£¬Á´½Ó¶Ï¿ªÊ±£¬Êý¾Ý¶ªÊ§£©
Tempdb£¨Êý¾ÝÄ£°å¿â£¬º¬´´½¨¿âʱµÄȱʡÊý¾Ý£©
, ......