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

oracle ÖеÄIN£¬LIke

 INÌõ¼þ
ÓÃINÌõ¼þÔÚÖ¸¶¨µÄÒ»×éÖµÖнøÐвâÊÔ¡£INÌõ¼þÒ²¾ÍÊÇ ³ÉÔ±Ìõ¼þ¡£
ÔÚ»ÃµÆÆ¬µÄÀý×ÓÖÐÏÔʾËùÓо­ÀíºÅΪ100¡¢101»ò201µÄ¹ÍÔ±µÄemployee numbers, last names, salariesºÍ¾­ÀíµÄemployee numbers¡£
ÔÚINÌõ¼þÖпÉÒÔʹÓÃÈκÎÊý¾ÝÀàÐÍ¡£ÏÂÃæµÄÀý×Ó´ÓEMPLOYEES±í·µ»Ø¹ÍÔ±ÐÅÏ¢ÐУ¬ÕâЩ¹ÍÔ±µÄÃû×Ö°üÀ¨ÔÚWHERE×Ó¾äµÄÃû×ÖÁбíÖУº
SELECT employee_id, manager_id, department_id
from employees
WHERE last_name IN ('Hartstein', 'Vargas');
Èç¹ûINÌõ¼þÖеijÉÔ±ÊÇ×Ö·û»òÈÕÆÚ£¬ËüÃDZØÐë·ÅÔÚµ¥ÒýºÅ (’ ’) ÖС£
½âÊÍ IN ( ... ) ʵ¼ÊÉÏÊÇÓÉOracle·þÎñÆ÷ת±äΪһ×éORÌõ¼þ£ºa = value1 OR a = value2 OR a = value3£¬ËùÒÔʹÓà IN ( ... ) ²¢Ã»Óеõ½ÐÔÄܵÄÌá¸ß£¬Ö»ÊÇÂß¼­Éϼòµ¥¡£
LIKEÌõ¼þ
ÄãÒ²Ðí²»×ÜÄÜÖªµÀÒªËÑË÷µÄÈ·ÇеÄÖµ£¬ÄãÄܹ»Ñ¡ÔñÄÇЩÓÃLIKEÌõ¼þÆ¥ÅäÒ»¸ö×Ö·ûÄ£°åµÄÐС£×Ö·ûÄ£°åÆ¥ÅäÔËËãÉæ¼°Í¨Åä·û²éѯ¡£ÓÐÁ½¸ö·ûºÅ % ºÍ _ ¿ÉÒÔÓÃÀ´¹¹ÔìËÑË÷´®¡£
·ûºÅ
˵Ã÷
%
±íʾÈÎÒâ˳ÐòµÄ0¸ö»ò¶à¸ö×Ö·û
_  ±íʾÈÎÒâµ¥¸ö×Ö·û
ͨÅä·û×Ö·ûµÄ×éºÏ
% ºÍ _ ·ûºÅÄܹ»±»ÓÃÀ´ÓëÎÄ×Ö×Ö·û×éºÏ¡£
SELECT last_namefrom employeesWHERE last_name LIKE '_o%';
ESCAPEÑ¡Ïî
µ±ÄãÐèÒªÓÐÒ»¸öÈ·ÇÐÆ¥Åäʵ¼ÊµÄ×Ö·û % ºÍ _ £¬Ê¹ÓÃESCAPEÑ¡Ï¸ÃÑ¡ÏîÖ¸¶¨»»Âë·ûÊÇʲô¡£Èç¹ûÄãÏëÒªËÑË÷°üº¬‘SA_’µÄ×Ö·û´®£¬¿ÉÒÔÓÃÏÂÃæµÄSQLÓï¾ä£º
SELECT employee_id, last_name, job_id
from employees
WHERE job_id LIKE '%SA\_%' ESCAPE '\';
ESCAPEÑ¡ÏîÖ¸¶¨·´Ð±Ïß (\) Ϊ»»Âë·û£¬ÔÚÄ£°åÖУ¬»»Âë·û×Ö·ûÔÚÏ»®Ïß (_) µÄÇ°Ãæ£¬Ô­ÒòÊÇOracle·þÎñÆ÷Öð×ֵؽâÊÍ×Ö·û´®¡£
NULLÌõ¼þ
NULLÌõ¼þ£¬°üÀ¨IS NULLÌõ¼þºÍIS NOT NULLÌõ¼þ¡£
IS NULLÌõ¼þÓÃÓÚ¿ÕÖµ²âÊÔ¡£¿ÕÖµµÄÒâ˼ÊÇÄÑÒÔ»ñµÃµÄ¡¢Î´Ö¸¶¨µÄ¡¢Î´ÖªµÄ»òÕß²»ÊÊÓõġ£Òò´Ë£¬Äã²»ÄÜÓà = £¬ÒòΪnull²»ÄܵÈÓÚ»ò²»µÈÓÚÈκÎÖµ¡£


Ïà¹ØÎĵµ£º

Ïêϸ½éÉÜORACLE sqlplusÃüÁî

 
Ò»¡¢ORACLEµÄÆô¶¯ºÍ¹Ø±Õ
1¡¢ÔÚµ¥»ú»·¾³ÏÂÒªÏëÆô¶¯»ò¹Ø±ÕORACLEϵͳ±ØÐëÊ×ÏÈÇл»µ½ORACLEÓû§£¬ÈçÏÂ
su - oracle
a¡¢Æô¶¯ORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b¡¢¹Ø±ÕORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>shutdow ......

ÀûÓÃoracle¿ìÕÕdblink½â¾öÊý¾Ý¿â±íͬ²½ÎÊÌâ


±¾ÊµÀýÒÑÍêȫͨ¹ý²âÊÔ,µ¥Ïò,ÓÖÏòͬ²½¶¼¿ÉʹÓÃ.
--Ãû´Ê˵Ã÷£ºÔ´——±»Í¬²½µÄÊý¾Ý¿â
            Ä¿µÄ——Ҫͬ²½µ½µÄÊý¾Ý¿â
ǰ6²½±ØÐëÖ´ÐÐ,µÚ6ÒÔºóÊÇһЩ¸¨ÖúÐÅÏ¢.
--1¡¢ÔÚÄ¿µÄÊý¾Ý¿âÉÏ£¬´´½¨dblink
drop public database link dblink_or ......

ORACLEÖÐÒ»¸öUPDATEµÄ²Ù×÷Á÷³Ì

ǰÕó×Ó¿´µ½Ò»Æª¹ØÓÚDELETE²Ù×÷µÄ¾ßÌåµÄÁ÷³Ì£¬½ñÌìÎÞÒâ¼äÓÖ¿´µ½Ò»¸öUPDATEµÄ²Ù×÷Á÷³Ì£¬Í¦ÓÐȤµÄ£¬×ª¹ýÀ´Ñ§Ï°Ñ§Ï°£¡
================================================================================
1£¬Óû§Ìá½»Ò»¸öupdateÓï¾ä
2£¬server process¼ì²éÄڴ滺´æ
      i Èç¹ûûÓÐÓÐЧÄÚ´æ¿Õ¼ ......

ORACLE²åÈëÈÕÆÚÊý¾Ý

 oracleÊý¾Ý¿â²åÈëÈÕÆÚÐÍÊý¾Ý
ÍùOracleÊý¾Ý¿âÖвåÈëÈÕÆÚÐÍÊý¾Ý£¨to_dateµÄÓ÷¨£©
½ñÌìÅöµ½ÁËÐèÒªÍùOracleÊý¾Ý¿âÖвåÈëÈÕÆÚÐÍÊý¾Ý£¬ÒªÊ¹ÓÃTO_DATEº¯Êý£¬ÔÚÍøÉÏ·¢ÏÖһƪдµÄ²»´íµÄÎÄÕ£¬ÕªÀ´Ò»Æð·ÖÏí¡£
INSERT  INTO  FLOOR  VALUES  ( to_date ( '2007-12-20 18:31:34' , 'YYYY-MM-DD HH24:M ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ