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
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
/*²»´øÈκβÎÊý´æ´¢¹ý³Ì(Êä³öϵͳÈÕÆÚ)*/
create or replace procedure output_date is
begin
dbms_output.put_line(sysdate);
end output_date;
/*´ø²ÎÊýinºÍoutµÄ´æ´¢¹ý³Ì*/
create or replace procedure get_username(v_id in number,v_username out varchar2)
as
begin
select username into v_usern ......
http://fangrn.javaeye.com/blog/514448
³õʶ oracle ÖеÄË÷Òý×éÖ¯±í
Ë÷Òý×éÖ¯±í£¨ IOT £©ÓÐÒ»ÖÖÀà B Ê÷µÄ´æ´¢×éÖ¯·½·¨¡£ÆÕͨµÄ¶Ñ×éÖ¯±íÊÇÒÔÒ»ÖÖÎÞÐòµÄ¼¯ºÏ´æ´¢¡£¶ø IOT ÖеÄÊý¾ÝÊǰ´Ö÷¼üÓÐÐòµÄ´æ´¢ÔÚ B Ê÷Ë÷Òý½á¹¹ÖС£ÓëÒ»°ã B Ê÷Ë÷Òý²»Í¬µÄµÄÊÇ£¬ÔÚ IOT ÖÐÿ¸öÒ¶½áµã¼´ÓÐÿÐеÄÖ÷¼üÁÐÖµ£¬ÓÖÓÐÄÇЩ· ......
Oracle ÄÚ´æ½á¹¹ÈçÏÂͼ£º
1£ºÊµÀý£¨Instance£©
ÔÚÒ»¸öÖУ¬Ã¿Ò»¸öÔËÐеÄOracleÊý¾Ý¿â¶¼ÓëÒ»¸öÊý¾Ý¿âʵÀýÏàÁªÏµ£¬ÊµÀýÊÇÎÒÃÇ
·ÃÎÊÊý¾Ý¿âµÄÊֶΡ£
ʵÀýÔÚ²Ù×÷ϵͳÖÐÓÃORACLE_SIDÀ´±êʶ£¬ÔÚOracleÖÐÓòÎÊýINSTANCE_NAMEÀ´±êʶ£¬
Ëü ......