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

ORACLE³ÌÐò°ü

³ÌÐò°ü
 
°üÖ÷Ìå/¹æ·¶Ãû×ÖÒ»Ñù
°üÖ÷Ìå/¹æ·¶ÖеĶÔÓ¦²ÎÊý±ØÐëÀàÐͼ°Ãû×ÖÒ»Ñù
Ö»ÄÜʹÓÃÇ¿ÀàÐ͵ÄREFÓαê
 
´´½¨³ÌÐò°ü¹æ·¶
create or replace package my_pack
is
       procedure find_emp_proc(eno emp.empno%type);
       function find_emp_fun(eno emp.empno%type) return emp.ename%type;
end my_pack;
 
SQL> ed
SQL> /
 
Package created
 
µ÷Óú¯Êý
SQL> select my_pack.find_emp_fun(7788) from dual;
 
select my_pack.find_emp_fun(7788) from dual
 
ORA-04068: ÒѶªÆú³ÌÐò°ü  µÄµ±Ç°×´Ì¬
ORA-04067: δִÐУ¬package body "SCOTT.MY_PACK" ²»´æÔÚ
ORA-06508: PL/SQL: ÎÞ·¨ÔÚµ÷ÓÃ֮ǰÕÒµ½³ÌÐòµ¥Ôª
ORA-06512: ÔÚline 1
 
Ö´Ðд洢¹ý³Ì
SQL> exec my_pack.find_emp_proc(7788);
 
begin my_pack.find_emp_proc(7788); end;
 
ORA-04068: ÒѶªÆú³ÌÐò°ü  µÄµ±Ç°×´Ì¬
ORA-04067: δִÐУ¬package body "SCOTT.MY_PACK" ²»´æÔÚ
ORA-06508: PL/SQL: ÎÞ·¨ÔÚµ÷ÓÃ֮ǰÕÒµ½³ÌÐòµ¥Ôª
ORA-06512: ÔÚline 2
 
´´½¨³ÌÐò°üÖ÷Ìå
create or replace package body my_pack
is
       empname emp.ename%type;
       procedure find_emp_proc(eno emp.empno%type)
       is
       begin
                 select ename into empname from emp where empno=eno;
                 dbms_output.put_line(empname);
       end;
       function find_emp_fun(eno emp.empno%type) return emp.ename%type
       is
       begin
                select ename into empname from emp where empno=eno;
      &nb


Ïà¹ØÎĵµ£º

OracleÌṩµÄÐòºÅº¯Êý

OracleÌṩµÄÐòºÅº¯Êý:
ÒÔemp±íΪÀý:
1: rownum ×î¼òµ¥µÄÐòºÅ µ«ÊÇÔÚorder by֮ǰ¾ÍÈ·¶¨Öµ.
select rownum,t.* from emp t order by ename
  ÐÐÊý
ROWNUM
EMPNO
ENAME
JOB
MGR
HIREDATE
SAL
COMM
DEPTNO
1
11
7876
ADAMS
CLERK
7788
1987-5-23
1100
¡¡
20
2
2
7499
ALLEN
SALESMAN
7698 ......

OracleÊý¾Ýµ¼Èëµ¼³öimp/exp

¹¦ÄÜ£ºOracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓëoracleÊý¾Ý»¹Ô­Ó뱸·Ý¡£´ó¶àÇé¿ö¶¼¿ÉÒÔÓÃOracleÊý¾Ýµ¼Èëµ¼³öÍê³ÉÊý¾ÝµÄ±¸·ÝºÍ»¹Ô­£¨²»»áÔì³ÉÊý¾ÝµÄ¶ªÊ§£©¡£
¡¡¡¡OracleÓиöºÃ´¦£¬ËäÈ»ÄãµÄµçÄÔ²»ÊÇ·þÎñÆ÷£¬µ«ÊÇÄã×°ÁËoracle¿Í»§¶Ë£¬²¢½¨Á¢ÁËÁ¬½Ó £¨Í¨¹ýnet8 assistantÖб¾µØ——>·þÎñÃüÃû Ìí¼ÓÕýÈ·µÄ·þÎñÃüÃû
¡¡¡¡Æ ......

Oracle:PL/SQL ÖÐÈçºÎʹÓÃArray

http://tech.163.com/05/0701/10/1NIODMQS00091589.html
ÒòΪÔÚPL/SQL Öв¢Ã»ÓÐÊý×é.
ÕâÊÇż²é×ÊÁÏÕҵķ¶ÀýºÍ×Ô¼ºÐ´µÄ·¶ÀýÀ´½âÊÍÈçºÎÔÚPL/SQL ÖÐʹÓÃÊý×é. Ò²ÐíºÜ¶àÈËÒÑÖªµÀ, ²»¹ý¾ÍÊÇÈò»ÖªµÀµÄÅóÓÑÃÇÁ˽âһϰɡ£
----------------------
µ¥Î¬Êý×é
------------------------
DECLARE
TYPE
emp_ssn_array IS TA ......

ORACLE directory Ŀ¼


Create directoryÈÃÎÒÃÇ¿ÉÒÔÔÚOracleÊý¾Ý¿âÖÐÁé»îµÄ¶ÔÎļþ½øÐжÁд²Ù×÷£¬¼«´óµÄÌá¸ßÁËOracleµÄÒ×ÓÃÐԺͿÉÀ©Õ¹ÐÔ¡£
ÆäÓ﷨Ϊ:
CREATE [OR REPLACE] DIRECTORY directory AS 'pathname';
±¾°¸Àý¾ßÌå´´½¨ÈçÏÂ:
create or replace directory exp_dir as '/tmp';
Ŀ¼´´½¨ÒԺ󣬾ͿÉÒ԰ѶÁдȨÏÞÊÚÓèÌض¨Óû§ ......

ORACLEÓαê

ORACLEÓαê
Óα꣺ÈÝÆ÷£¬´æ·Åµ±Ç°SQLÓï¾äÓ°ÏìµÄ¼Ç¼
       ËùÓÐDMLÓï¾ä¶¼»áÓõ½Óαê
      
       ÖðÐд¦ÀíÓ°ÏìµÄÐÐÊý
 
Óαê
       ¾²Ì¬Óα꣺ÓαêÓëSQLÓï¾äÔÚÔËÐÐÇ°¹ØÁª
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ