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

³õѧPL/SQLµÄһЩ»ù±¾ÖªÊ¶

 1,Ò»¸öÍêÕûµÄPL/SQL Óï¾äÓÉÈý¸ö²¿·Ö×é³É¡£
             declare
                   ÉùÃ÷²¿·Ö£¬¶¨Òå±äÁ¿£¬Êý¾ÝÀàÐÍ£¬Òì³££¬¾Ö²¿×Ó³ÌÐòµÈ¡£
             begin
                   Ö´Ðв¿·Ö£¬ÊµÏÖ¿éµÄ¹¦ÄÜ¡£
             Exception
                   Òì³£´¦Àí²¿·Ö£¬´¦Àí³ÌÐòÖ´Ðйý³ÌÖвúÉúµÄÒì³£¡£
             end;
Ö´Ðв¿·ÖÊDZØÐèµÄ£¬¶øÉùÃ÷²¿·ÖºÍÒì³£²¿·ÖÊÇ¿ÉÑ¡µÄ¡£
¿ÉÒÔÔÚÒ»¸ö¿éµÄÖ´Ðв¿·Ö»òÒì³£´¦Àí²¿·ÖǶÌ×ÆäËüµÄPL/SQL¿é
ËùÓеÄPL/SQL ¿é¶¼ÊÇÒÔ"end;"½áÊøµÄ¡£
2£¬¶¨ÒåÒ»¸ö°üº¬ÉùÃ÷²¿·Ö£¬Ö´Ðв¿·ÖºÍÒì³£´¦Àí²¿·ÖµÄPL/SQL¿é
   declare
     v_bookName varchar2(50);
   begin
     select bookname into v_bookName from Book where BookId=1;
     DBMS_output.put_line(v_bookName);
    Exception
      when no_Data_Found then
      DBMS_output.put_line('there is not such a bookname');
      end;
×¢Ò⣺ÈôÒªÔÚSQL*PLus»·¾³Öп´µ½DBMS_OutPut.Put_Line·½·¨µÄÊä³ö½á¹û£¬±ØÐ轫»·¾³±äÁ¿ServeroutputÉèÖÃΪon
     SQL>set serveroutput on
3,   %TYPEÓë%ROWTYPE
Èç¹ûÒª¶¨ÒåÒ»¸öÀàÐÍÓëij¸ö±äÁ¿µÄÊý¾ÝÀàÐÍ»òÊý¾Ý±íÖÐij¸öÁеÄÊý¾ÝÀàÐÍÒ»Ö£¨²»ÖªµÀ¸Ã±äÁ¿»òÁеÄÊý¾ÝÀàÐÍ£©µÄ±äÁ¿£¬
¿ÉÒÔÀûÓÃ%TypeʵÏÖ¡£
Èç¹ûÒª¶¨ÒåÒ»¸öÓëÊý¾Ý¿âÖÐij¸ö±í½á¹¹Ò»ÖµļǼÀàÐ͵ıäÁ¿£¬¿ÉÒÔÀûÓÃ%rowtypeʵÏÖ¡£
ÀýÈ磺
   declare
           v_book book.bookname%Type;
 &


Ïà¹ØÎĵµ£º

̽ÌÖPHP SQL×¢ÈëµÄ½â¾ö˼·

˼·:SQLÀᄀ¿ÉÄܵIJÉÓÃÁ½¸öÒýºÅ±ÕºÏ±äÁ¿;¶Ô±äÁ¿ÖеÄÒýºÅתÒå;¶Ô²»ÄܲÉÓÃ2¸öÒýºÅ±ÕºÏµÄ±äÁ¿,ÏÈÔ¤ÏÈÅжϱäÁ¿ÀàÐÍ;  
   
  ·½°¸:  
  1   ËùÓзÇÊýÖµÔËËã(Èç×Ö·û,¼òµ¥ÊýÖµÐ͵ȵÈ)µÄSQL±äÁ¿¶¼¼ÓÒýºÅ;  
  2   ËùÓзÇÊýÖµÔËËãµÄSQL±äÁ¿µÄÖµ¶¼²ÉÓÃmagic_quotes_gpc» ......

Ãâ°²×°Oracle¿Í»§¶ËÈí¼þ ʹÓÃpl/sqlÅäÖõǽ

ËäÈ»ÕâÊÇÎÒÕÒµ½×îÏêϸµÄÅäÖÃÃèÊö£¬µ«Êdz¢ÊÔ»¹ÊÇûÓгɹ¦¡£
 
1.ÏÂÔØOracle Client Package
.
´Ó
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
ÏÂÔØ
Instant
Client Package – Basic
°ü
(

±ê×¢
:All files
required to run OCI, OCCI, and JDBC-OC ......

sql server2005 rownumͨÓô洢¹ý³Ì·ÖÒ³

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER   PROCEDURE [dbo].[sp_GetRecordfromPage]
@TableName varchar(350),        --±íÃû
@Fields varchar(5000) = '*',    --×Ö¶ÎÃû(È«²¿×Ö¶ÎΪ*)
@OrderField varchar(5000),   &nbs ......

תÔØ¡°½â¾öSQL SERVER 2005ÓÃsaµÇ½ÎÊÌ⡱

×°sql 2005ºó¶ÔһЩ¹¦ÄÜ»¹²»ÊǺÜÏ°¹ß£¬±ÈÈçÓÃsaµÇ¼Êý¾Ý¿âÔںܶàµØ·½¶¼»áÓõ½£¬½ñÌì¾ÍsaµÇ¼Êý¾Ý¿âµÄһЩÐÞ¸ÄÓë´ó¼Ò·ÖÏí¡£
1.ÏÈÓÃWINDOWSģʽµÇ½,È»ºóÔÚÊý¾Ý¿â¶¥¶ËÓÒ¼üÊôÐÔ£»Èçͼ1-1£º
2.ÔÚ°²È«ÐÔϵÄWINDOWSģʽ¸ÄΪSQLÓëWINDOWSģʽ£¬ÏÂÃæµÄµÇ½ÉóºËÑ¡Ïî,Ñ¡ÔñΪ‘ÎÞ’£¬µã‘È·¶¨’£»Èçͼ1-2£º
3. ......

ÎÒµÄSQL֮·2

   ÖÁ½ñδÓгɾͣ¬Éõ¸ÐáÝáå¡£
   ²¢²»ÊǺÜͻȻµÄÏëѧSQL£¬¶øÊÇÔÚ֮ǰ˵µÄÄÇÑù£¬ÔÚÎÒÈÆÁËÒ»´óȦ֮ºó£¬²ÅÖªµÀ×Ô¼ºÒ²ÊÇÒ»ÎÞËùÖª£¬Í÷ѧÁËÕâô¶àÄê¡£
   ÎÒÒ»Ö±ÏëÍÑÀëѧУµÄ½ÌÓýģʽÀ´×Ôѧ£¬È»¶øÎÒ²¢²»³ÐÈÏѧУµÄ½ÌÓý·½Ê½ÊÇÒ»ÎÞËùÓõģ¬ÖÁÉÙѧµ½µÄ¶«Î÷ÊÇʵÔڵġ£´ÓѧУµÄ½Ç¶ÈÀ´¿¼ÂÇ£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ