oracle exists and not exist
ÏÈ¿´ÏÂÃæµÄÀý×Ó:oracleÖÐÁ½¸öϵͳ±í.emp,dept.
example:
1:not exists(not in)
not exists:
ÕâÌõÓï¾ä·µ»Øselect * from scott.dept d where e.deptno=d.deptno and d.deptno=10Ìõ¼þÂú×ãµÄ½á¹û¼¯.Ò²¾ÍÊÇ˵,
·µ»ØµÄ½á¹û¼¯Öв»´æÔÚd.deptno=10½á¹û¼¯µÄ¼Ç¼,¼´emp±íÖÐûÓÐdept±íÖÐd.deptno=10µÄ¼Ç¼.
SQL> select empno,ename,deptno from scott.emp e where not exists(select * from scott.dept d where e.deptno=d.deptno and d.deptno=10);
EMPNO ENAME DEPTNO
----- ---------- ------
7369 SMITH 20
7499 ALLEN 30
7521 WARD 30
7566 JONES 20
7654 MARTIN 30
7698 BLAKE 30
7788 SCOTT 20
7844 TURNER 30
7876 ADAMS 20
7900 JAMES 30
7902 FORD 20
11 rows selected
not in:
µÚÒ»¸öwhereÌõ¼þ±ØÐë¸ø¶¨×Ö¶Î(deptno), µÚ¶þ¸ösqlÓï¾äÖÐ,±ØÐëÃ÷È·¸ø¶¨Òª²éѯµÄ×Ö¶ÎÊÇÄĸö(deptno).
SQL> select empno,ename,deptno from scott.emp e where deptno not in(select deptno from scott.dept d where e.deptno=d.deptno and d.deptno=10);
EMPNO ENAME DEPTNO
----- ---------- ------
7369 SMITH 20
7499 ALLEN 30
7521 WARD 30
7566 JONES
Ïà¹ØÎĵµ£º
extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î» --segment management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......
Ë÷Òý×éÖ¯±í£¨IOT£©ÓÐÒ»ÖÖÀàBÊ÷µÄ´æ´¢×éÖ¯·½·¨¡£ÆÕͨµÄ¶Ñ×éÖ¯±íÊÇÒÔÒ»ÖÖÎÞÐòµÄ¼¯ºÏ´æ´¢¡£¶øIOTÖеÄÊý¾ÝÊÇ°´Ö÷¼üÓÐÐòµÄ´æ´¢ÔÚBÊ÷Ë÷Òý½á¹¹ÖС£ÓëÒ»°ãBÊ÷Ë÷Òý²»Í¬µÄµÄÊÇ£¬ÔÚIOTÖÐÿ¸öÒ¶½áµã¼´ÓÐÿÐеÄÖ÷¼üÁÐÖµ£¬ÓÖÓÐÄÇЩ·ÇÖ÷¼üÁÐÖµ¡£
ÔÚIOTËù¶ÔÓ¦µÄBÊ÷½á¹¹ÖУ¬Ã¿¸öË÷ÒýÏî°ü ......
¼Ç¼һÏÂORACLE 10gR2µÄÈí¼þÏÂÔصØÖ·£¬±¸Óá£
ÏÂÔØOTNÉϵÄÕâЩÈí¼þ£¬ÄãÐèÒªÒ»¸öOTNÃâ·ÑÕʺţ¬²»¹ýÈç¹ûͨ¹ýѸÀ×½øÐÐÏÂÔØ£¬¾Í²»ÓõǽOTNÁË£º
Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Microsoft Windows (32-bit)
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database ......
Ò»¸öʵÀý¿ÉÒÔÓжà¸öºǫ́½ø³Ì,µ«ÊÇ£¬²¢²»ÊÇÿһ¸öºǫ́½ø³Ì¶¼»á³ö³ö£¬Í¨¹ýÊÓͼv$bgprocess¿ÉÒԲ鿴ºǫ́½ø³ÌÐÅÏ¢¡£
Ò»°ãÎÒÃÇÊÇͨ¹ýÒÔÏÂsql²é¿´ºǫ́±ØÐëµÄºǫ́½ø³Ì.
1.²é¿´ºǫ́½ø³Ì
select paddr,name,description
from v$bgprocess
order by paddr desc
£»
2.Õâ¸öÊÓͼÖÐpaddr<>'00'µÄÐж¼ÊÇϵͳÉÏÅäÖúÍÔËÐеĽø³ ......
ÿ¸ô¼¸ÃëÖÓlistenerÈÕÖ¾ÖоͳöÏÖÒ»´Î¸Ã´íÎóµÄ¼Ç¼£¬¼´Ê¹ÊÇÔÚûÓÐÈËʹÓõÄÇé¿öÏÂÒ²ÊÇÈç´Ë£¬²»¹ý²¢Ã»Óз¢ÏÖ¿Í»§¶Ë»úÆ÷²»ÄÜÕý³£Á¬½ÓÊý¾Ý¿âµÄÇé¿ö¡£
Oracle¹ØÓÚTNS-12502´íÎóµÄ½âÊÍ:
Error: ORA-12502 / TNS-12502
Text: TNS:listener received no CONNECT_DATA from client
Cause: No CONNECT_DATA was ......