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

ORACLE SQLÓÅ»¯

ORACLE SQLÓÅ»¯
£¨1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
ORACLE µÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom ×Ó¾äÖеıíÃû£¬from ×Ó¾äÖÐдÔÚ×îºóµÄ±í
(»ù´¡±ídriving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom ×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç
¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£Èç¹ûÓÐ3¸öÒÔÉϵıíÁ¬½Ó²éѯ, ÄǾÍÐèҪѡÔñ½»²æ±í(intersec
tion table)×÷Ϊ»ù´¡±í, ½»²æ±íÊÇÖ¸ÄǸö±»ÆäËû±íËùÒýÓõıí.
£¨2£© WHERE ×Ó¾äÖеÄÁ¬½Ó˳Ðò£®£º
ORACLE ²ÉÓÃ×Ô϶øÉϵÄ˳Ðò½âÎöWHERE ×Ó¾ä,¸ù¾ÝÕâ¸öÔ­Àí,±íÖ®¼äµÄÁ¬½Ó±ØÐëдÔÚÆäËûWHE
RE Ìõ¼þ֮ǰ, ÄÇЩ¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐëдÔÚWHERE ×Ó¾äµÄĩβ.
£¨3£© SELECT ×Ó¾äÖбÜÃâʹÓÑ * ‘£º
ORACLE ÔÚ½âÎöµÄ¹ý³ÌÖÐ, »á½«'*' ÒÀ´Îת»»³ÉËùÓеÄÁÐÃû, Õâ¸ö¹¤×÷ÊÇͨ¹ý²éѯÊý¾Ý×Öµä
Íê³ÉµÄ, ÕâÒâζ׎«ºÄ·Ñ¸ü¶àµÄʱ¼ä
£¨4£© ¼õÉÙ·ÃÎÊÊý¾Ý¿âµÄ´ÎÊý£º
ORACLE ÔÚÄÚ²¿Ö´ÐÐÁËÐí¶à¹¤×÷: ½âÎöSQL Óï¾ä, ¹ÀËãË÷ÒýµÄÀûÓÃÂÊ, °ó¶¨±äÁ¿, ¶ÁÊý¾Ý¿é
µÈ£»
£¨5£© ÔÚSQL*Plus , SQL*Forms ºÍPro*C ÖÐÖØÐÂÉèÖÃARRAYSIZE ²ÎÊý, ¿ÉÒÔÔö¼Óÿ´Î
Êý¾Ý¿â·ÃÎʵļìË÷Êý¾ÝÁ¿,½¨ÒéֵΪ200
£¨6£© ʹÓÃDECODE º¯ÊýÀ´¼õÉÙ´¦Àíʱ¼ä£º
ʹÓÃDECODE º¯Êý¿ÉÒÔ±ÜÃâÖظ´É¨ÃèÏàͬ¼Ç¼»òÖظ´Á¬½ÓÏàͬµÄ±í.
£¨7£© ÕûºÏ¼òµ¥,ÎÞ¹ØÁªµÄÊý¾Ý¿â·ÃÎÊ£º
Èç¹ûÄãÓм¸¸ö¼òµ¥µÄÊý¾Ý¿â²éѯÓï¾ä,Äã¿ÉÒÔ°ÑËüÃÇÕûºÏµ½Ò»¸ö²éѯÖÐ(¼´Ê¹ËüÃÇÖ®¼äûÓÐ
¹Øϵ)
£¨8£© ɾ³ýÖظ´¼Ç¼£º
×î¸ßЧµÄɾ³ýÖظ´¼Ç¼·½·¨( ÒòΪʹÓÃÁËROWID)Àý×Ó£º
DELETE from EMP E WHERE E.ROWID > (SELECT MIN(X.ROWID)
from EMP X WHERE X.EMP_NO = E.EMP_NO);
£¨9£© ÓÃTRUNCATE Ìæ´úDELETE£º
µ±É¾³ý±íÖеļǼʱ,ÔÚͨ³£Çé¿öÏÂ, »Ø¹ö¶Î(rollback segments ) ÓÃÀ´´æ·Å¿ÉÒÔ±»»Ö¸´
µÄÐÅÏ¢. Èç¹ûÄãûÓÐCOMMIT ÊÂÎñ,ORACLE »á½«Êý¾Ý»Ö¸´µ½É¾³ý֮ǰµÄ״̬(׼ȷµØ˵Êǻָ´
µ½Ö´ÐÐɾ³ýÃüÁî֮ǰµÄ×´¿ö) ¶øµ±ÔËÓÃTRUNCATE ʱ, »Ø¹ö¶Î²»ÔÙ´æ·ÅÈκοɱ»»Ö¸´µÄÐÅÏ¢.
µ±ÃüÁîÔËÐкó,Êý¾Ý²»Äܱ»»Ö¸´.Òò´ËºÜÉÙµÄ×ÊÔ´±»µ÷ÓÃ,Ö´ÐÐʱ¼äÒ²»áºÜ¶Ì. (ÒëÕß°´: TRU
NCATE Ö»ÔÚɾ³ýÈ«±íÊÊÓÃ,TRUNCATE ÊÇDDL ²»ÊÇDML)
£¨10£© ¾¡Á¿¶àʹÓÃCOMMIT£º
Ö»ÒªÓпÉÄÜ,ÔÚ³ÌÐòÖо¡Á¿¶àʹÓÃCOMMIT, ÕâÑù³ÌÐòµÄÐÔÄܵõ½Ìá¸ß,ÐèÇóÒ²»áÒòΪCOMMIT
ËùÊͷŵÄ×ÊÔ´¶ø¼õÉÙ:
COMMIT ËùÊͷŵÄ×ÊÔ´:
a. »Ø¹ö¶ÎÉÏÓÃÓÚ»Ö¸´Êý¾ÝµÄÐÅÏ¢.
b. ±»³ÌÐòÓï¾ä»ñµÃµÄËø
c


Ïà¹ØÎĵµ£º

Oracle±í¿Õ¼ä¹ÜÀí

extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î»      --segment    management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......

ORACLEʵÀýµÄºǫ́½ø³Ì

    ÏÂÃæ¾ÍÀ´½éÉÜÒ»ÏÂÕâЩÔÚºǫ́ÐÁÇÚ¹¤×÷µÄ½ø³ÌÃÇ¡£ÏµÍ³¼ì²âÆ÷£¨System Monitor,SMON£©¡¢½ø³Ì¼àÊÓÆ÷£¨Process
Monitor,PMON£©¡¢Êý¾Ý¿âдÈëÆ÷£¨Database Writer,DBWn£©¡¢ÈÕ־дÈëÆ÷£¨Log
Writer,LGWR£©¡¢¼ì²éµã½ø³Ì£¨Checkpoint Process,CKPT£© ¡£
1¡¢SMON£º°²×°ºÍ´ò¿ªÊý¾Ý¿â¡£Í¨¹ý²éÕÒºÍ
ÑéÖ¤Êý¾Ý¿â¿ØÖÆ ......

Oracle ERP²ÆÎñϵͳ——¹Ì¶¨×ʲú

1 ×ʲúÀàÐÍ
×ʲúÀàÐÍ£º×ʱ¾»¯¡¢CIP¡¢·ÑÓÃÐÔ
×ʱ¾»¯£ºÊÇÖ¸ÐèÒª¼ÆËãÕ۾ɵÄ×ʲú
CIP£ºÊÇÔÚ½¨¹¤³Ì×ʲú£¬Éв»ÐèÕ۾ɣ¬´ýÆä×ʱ¾»¯Ö®ºóÔÙ¿ªÊ¼ÕÛ¾É
·ÑÓÃÐÔ£ºÊDz»¼ÆËãÕ۾ɣ¬¸Ã×ʲúµÄ³É±¾¶¼×÷Ϊ·ÑÓô¦Àí
 
2 ×ʲúÔö¼Ó
×ʲúÔö¼ÓÓÐÁ½ÖÖ·½Ê½£ºÊÖ¶¯Ôö¼Ó£¬×Ô¶¯Ôö¼Ó¡£
×Ô¶¯Ôö¼ÓÊÇÖ¸ÓÉÆäËûÄ£¿é£¨APÄ£¿é»òPAÄ£¿é£©´«µÝµ½×ʲúÄ£¿é ......

oracleС¼Ç1 5ºÅ

Ò»¡¢          oracle»ù´¡ÖªÊ¶
a¡¢  CRUD²Ù×÷ create read update delete
b¡¢  Êý¾Ý¿â¶ÔÏó
c¡¢  Êý¾Ý¿âÉè¼Æ
d¡¢  Êý¾Ý¿â½á¹¹ÌåϵÓÅ»¯£¨DBA£©
oracleÖдæÔÚËÄÕÅÁ·Ï°±í emp dept slmgad bonus ÕâËÄÕÅ±í£¬»¹ÓÐÒ»ÕÅdual±íÁ·Ï°±í±íÖÐÖ»ÓÐÒ»¸ö×Ö¶ÎÒ»¸öÊý ......

oracle sqlÓïÑÔÄ£ºý²éѯ ͨÅä·ûlikeµÄʹÓý̳Ì

ÔÚWhere×Ó¾äÖУ¬¿ÉÒÔ¶Ôdatetime¡¢char¡¢varchar×Ö¶ÎÀàÐ͵ÄÁÐÓÃLike×Ó¾äÅäºÏͨÅä·ûÑ¡È¡ÄÇЩ“ºÜÏñ...”µÄÊý¾Ý¼Ç¼£¬ÒÔÏÂÊÇ¿ÉʹÓõÄͨÅä·û£º
%   Áã»òÕ߶à¸ö×Ö·û
_    µ¥Ò»ÈκÎ×Ö·û£¨Ï»®Ïߣ©
\     ÌØÊâ×Ö·û
[]     ÔÚijһ·¶Î§ÄÚµÄ×Ö·û£¬Èç ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ