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

PL/SQLѧϰ±Ê¼ÇÁù


1.´´½¨¹ý³Ì
create or replace procedure ¹ý³ÌÃû as
   ÉùÃ÷Óï¾ä¶Î;
begin
   Ö´ÐÐÓï¾ä¶Î;
exception
   Òì³£´¦ÀíÓï¾ä¶Î;
end;
2. ´ø²ÎÊýµÄ¹ý³Ì
²ÎÊýÀàÐÍ3ÖÖ
in²ÎÊý£º¶ÁÈë²ÎÊý£¬Ö÷³ÌÐòÏò¹ý³Ì´«µÝ²ÎÊýÖµ
out²ÎÊý£ºÊä³ö²ÎÊý£¬¹ý³ÌÏòÖ÷³ÌÐò´«µÝ²ÎÊýÖµ
in out²ÎÊý£ºË«Ïò²ÎÊý
¶¨Òå´ø²ÎÊýµÄ¹ý³ÌʾÀý£º
Set  serveroutput on
create or replace procedure scott.tempprocedure(
   tempdeptno in scott.dept.deptno%type, --ÊäÈë²ÎÊý
   tempdname out scott.dept.dname%type, --Êä³ö²ÎÊý
   temploc in out scott.dept.loc%type) as -- Ë«Ïò²ÎÊý
   loc1   scott.dept.loc%type;
   dname1 scott.dept.dname%type;
begin
   select loc  into loc1
   from  scott.dept
   where  deptno=tempdeptno;
   select dname  into dname1
   from  scott.dept
   where  deptno=tempdeptno;
   temploc:='µØÖ·:'||loc1;
   tempdname:='ÐÕÃû'||dname1;
end;
ʹÓôø²ÎÊýµÄ¹ý³ÌʾÀý£º
set serveroutput on
declare 
   myno  scott.dept.deptno%type;
   mydname  scott.dept.dname%type;
   myloc  scott.dept.loc%type;
begin
   myno:=10;
   mydname:='';
   myloc:='';
   scott.tempprocedure(myno,mydname,myloc);
   dbms_output.put_line(myno);
   dbms_output.put_line(mydname);
   dbms_output.put_line(myloc);
end;


Ïà¹ØÎĵµ£º

SQL Server³£Óú¯Êý

ÔÚÊý¾Ý¿â²éѯÊý¾Ýʱ£¬ÎÒÃǾ­³£Ê¹ÓÃһЩº¯Êý£¬Ê¹ÎÒÃǵIJéѯ¸ü¼Ó·½±ã¿ì½Ý£¬ÏÂÃæ¾Í°ÑSQL ServerÖÐÎÒÃdz£Óõöº¯Êý¸øÁоٳöÀ´£¬¹©²Î¿¼¡£
1.×Ö·û´®º¯ÊýÓû§¿ØÖÆ·µ»Ø¸øÓû§µÄ×Ö·û´®£¬ÕâЩ¹¦ÄܽöÓÃÓÚ×Ö·ûÐÍÊý¾Ý¡£
2.ÈÕÆÚº¯ÊýÓÃÓÚ²Ù×÷ÈÕÆÚÖµ£¬ÎÒÃDz»ÄÜÖ±½Ó¶ÔÈÕÆÚÔËÓÃÊýѧº¯Êý¡£
3.Êýѧº¯ÊýÓÃÓÚ¶ÔÊýÖµ½øÐдúÊýÔËËã¡£
4.ϵͳº¯ ......

SQLÓï¾äµÄÓÅ»¯ÒÔ¼°Ë÷ÒýµÄÓ¦Ó÷¶Î§

SQLÓÅ»¯µÄÔ­ÔòÊÇ£º½«Ò»´Î²Ù×÷ÐèÒª¶ÁÈ¡µÄBLOCKÊý¼õµ½×îµÍ¡£
µ÷Õû²»Á¼SQLͨ³£¿ÉÒÔ´ÓÒÔϼ¸µãÇÐÈ룺
¼ì²é²»Á¼µÄSQL£¬¿¼ÂÇÆäд·¨ÊÇ·ñ»¹ÓпÉÓÅ»¯ÄÚÈÝ£»
¼ì²é×Ó²éѯ¿¼ÂÇSQL×Ó²éѯÊÇ·ñ¿ÉÒÔÓüòµ¥Á¬½ÓµÄ·½Ê½½øÐÐÖØÐÂÊéд£»
¼ì²éÓÅ»¯Ë÷ÒýµÄʹÓã»
¿¼ÂÇÊý¾Ý¿âµÄÓÅ»¯Æ÷;
²éѯµÄÒ»°ã¹æÔò
Ø      ......

³¬¼¶SQL——ÔÚSQLÖÐÀÛ¼Ó

´ËΪתÌù£¬µ«ÊÇ´ÓÁ¬¸öÌû×ÓÖÐÊÕ¼¯¶øÀ´
ÏÂÃæÀ´Ò»Æð¿´¿´ÂÛ̳ÀïµÄÒ»¸öoracle·½ÃæµÄÎÊÌ⣺
====================Question
=========================
  jmbdat         dayt           y           &n ......

sqlº¯Êý¡¡

1¡¢ISNULL ( check_expression , replacement_value )
²ÎÊý
check_expression
½«±»¼ì²éÊÇ·ñΪ NULLµÄ±í´ïʽ¡£check_expression ¿ÉÒÔÊÇÈκÎÀàÐ͵ġ£
replacement_valueÔÚ check_expressionΪNULLʱ½«·µ»ØµÄ±í´ïʽ¡£replacement_value ±ØÐëÓë check_expresssion ¾ßÓÐÏàͬµÄÀàÐÍ¡£
·µ»ØÀàÐÍ
·µ»ØÓë check_expression Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ