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 9i¶¯Ì¬SGA¹ÜÀí
ÔÚOracle 9iÖУ¬¿ÉÒÔÉèÖÃSGA_MAX_SIZE£¬¸Ã²ÎÊýÓÃÒÔ¿ØÖƸ÷»º³å³ØʹÓõÄÄÚ´æ×ܺͣ¬±¾ÖÊÉÏÊÇÔÚ½ø³ÌÖÐÔ¤ÏÈ·ÖÅäÒ»¶ÎÐéÄâµØÖ·±¸Óöø²»·ÖÅäÎïÀíÄڴ棬ĿµÄÊÇ·ÀÖ¹ºÍ½ø³Ç˽ÓеØÖ·¶ÎµÄ³åÍ»¡£
Ö»Òª×ܵÄSGAÄÚ´æÉèÖò»³¬¹ýSGA_MAX_SIZEµÄÉèÖ㬸ü¸Ä¶¼¿ÉÒÔÁ¢¼´ÉúЧ¡£ÐèҪעÒâµÄÊÇ£¬ÔÚOracle 9iR1ÖУ¬¶¯Ì¬¼õСÄÚ´ ......
µÚÒ»¸öÀࣺ
/**
*
* ´æ·ÅoracleÊý¾Ý¿âµÄÁ´½ÓÐÅÏ¢¡£
*
* @author ZhongHuiQiang
*
*/
public interface IOracleDAOInfor {
String DB_SERVER_HOSET = "localhost";
String DB_SERVER_NAME = "ppoo";
String DB_USER_NAME = "system";
String DB ......
Ò»¡¢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 ......
±¾ÊµÀýÒÑÍêȫͨ¹ý²âÊÔ,µ¥Ïò,ÓÖÏòͬ²½¶¼¿ÉʹÓÃ.
--Ãû´Ê˵Ã÷£ºÔ´——±»Í¬²½µÄÊý¾Ý¿â
Ä¿µÄ——Ҫͬ²½µ½µÄÊý¾Ý¿â
Ç°6²½±ØÐëÖ´ÐÐ,µÚ6ÒÔºóÊÇһЩ¸¨ÖúÐÅÏ¢.
--1¡¢ÔÚÄ¿µÄÊý¾Ý¿âÉÏ£¬´´½¨dblink
drop public database link dblink_or ......