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

¡¾×ª¡¿ PL/SQL×î²îʵ¼ù

PL/SQL×î²îʵ¼ù
http://benben.javaeye.com/blog/278164
1. ³¬³¤µÄPL/SQL´úÂë
           Ó°Ï죺¿Éά»¤ÐÔ£¬ÐÔÄÜ
           Ö¢×´£º
            ÔÚ¸´ÔÓµÄÆóÒµÓ¦ÓÃÖУ¬´æÔÚ¶¯éü³É°ÙÉÏǧÐеĴ洢¹ý³Ì»òÉÏÍòÐеİü¡£
        ΪʲôÊÇ×î²î£º
            Ì«³¤µÄPL/SQL´úÂë²»ÀûÓÚÔĶÁ£¬µÚÈý·½¹¤¾ßÔÚµ÷ÊÔʱҲ»á³öÏÖ´úÂëÐлìÂÒµÈÎÊÌâ¡£PL/SQL´æ´¢¶ÔÏ󣨴洢¹ý³Ì¡¢°ü¡¢º¯Êý¡¢´¥·¢Æ÷µÈ£©ÐÐÊýÉÏÏÞԼΪ6000000ÐУ¬µ«Êµ¼Ê¹¤×÷ÖУ¬µ±°ü´óС³¬¹ý5000Ðоͻá³öÏÖµ÷ÊÔÎÊÌâ¡£
        ½â¾öÖ®µÀ£º
            PL/SQL´úÂëÔÚÖ´ÐÐÇ°»á±»¼ÓÔص½shared poolÖУ¬shared poolÒÔ×Ö½ÚΪµ¥Î»£¬UNIXÏÂΪ64K£¬×ÀÃæ»·¾³ÏÂΪ32K£¬¿ÉÒÔͨ¹ý²éѯÊý¾Ý×ÖµäUSER_OBJECT_SIZEµÄPARSED_SIZE×ֶβ鿴¶ÔÏó´óС¡£¶ÔÓڽϴóµÄ°ü£¬Ó¦²ÉÓòð°ü²ßÂÔ£¬³éÈ¡¸´Óò¿·Ö£¬¼õÉÙÖظ´´úÂ룻¶ÔÓڽϴóµÄ´æ´¢¹ý³Ì£¬Ó¦½«´æ´¢¹ý³Ì×éÖ¯µ½°üÖУ¬Ò×ÓÚ¹ÜÀí£»¶ÔÓڽϴóµÄÄäÃû¿é£¬Ó¦½«ÄäÃû¿éÖØж¨Òå³É×Ó¹ý³Ì±£´æÔÚÊý¾Ý¿âÖС£
        2. ÍÑÀë¿ØÖƵÄÈ«¾Ö±äÁ¿
        Ó°Ï죺¿Éά»¤ÐÔ
        Ö¢×´£ºÔÚ°üÖÐʹÓÃÁËÈ«¾Ö±äÁ¿£¬ÔÚ¶à¸öλÖöÔÈ«¾Ö±äÁ¿½øÐвÙ×÷¡£
        CREATE OR REPLACE PACKAGE BODY PKG_TEST IS
        GN_È«¾Ö±äÁ¿ NUMBER(12, 2);
        PROCEDURE ¹ý³ÌA IS
        BEGIN
        GN_È«¾Ö±äÁ¿:=1;
        END;
        PROCEDURE ¹ý³ÌB IS
        BEGIN
        GN_È«¾Ö±äÁ¿:=2; -- ÕâÀï¶ÔÈ«¾Ö±äÁ¿½øÐÐÁËÁíÍâµÄ²Ù×÷
        EN


Ïà¹ØÎĵµ£º

ÒÆÖ²SQL serverÊý¾Ý¿â¶ÔÏóµ½OracleµÄ²Ù×÷˵Ã÷

ÒÔÏÂÊÇÕª×ÔOracle¹ÙÍø:
¢ñ Oracle SQL Developer ÊÇÒ»¸öÃâ·ÑµÄͼÐλ¯Êý¾Ý¿â¿ª·¢¹¤¾ß¡£Ê¹Óà SQL Developer£¬Äú¿ÉÒÔä¯ÀÀÊý¾Ý¿â¶ÔÏó¡¢ÔËÐÐ SQL Óï¾äºÍ SQL ½Å±¾£¬²¢ÇÒ»¹¿ÉÒԱ༭ºÍµ÷ÊÔ PL/SQL Óï¾ä¡£Äú»¹¿ÉÒÔÔËÐÐËùÌṩµÄÈκÎÊýÁ¿µÄ±¨±í£¬ÒÔ¼°´´½¨ºÍ±£´æÄú×Ô¼ºµÄ±¨±í¡£SQL Developer ¿ÉÒÔÌá¸ß¹¤×÷ЧÂʲ¢¼ò»¯Êý¾Ý¿â¿ª·¢ÈÎÎñ¡£ ......

ms sql case when elseÓï¾äʹÓü¼ÇÉ

    ¹¤×÷ÖÐÅöµ½µÄС¼¼ÇÉ£¬±ÈÈç˵ҪÓÃÊý¾Ý±íÀïÈ¡³ö×¢²áÓû§µÄ×ÊÁÏ£¬ÐÔ±ðΪ1ÔòÏÔʾΪÄÐÉú£»ÐÔ±ðΪ2ÔòÏÔʾΪŮÉú£»ÒÔÇ°¶¼ÊÇ´Ó±íÀïÈ¡³öÊý¾Ý£¬È»ºóÔÙÓôúÂë½øÐÐÅжϣ¬Îª1ÔòÏÔʾΪÄÐÉú£»Îª2ÔòÏÔʾΪŮÉú£»Æäʵµ¥ÓÃSQLÓï¾ä¾Í¿ÉÒÔ×öµ½£¬ÈçÏ£º
Ö±½ÓʹÓÃcase when else Óï¾ä
Case¾ßÓÐÁ½ÖÖ¸ñʽ¡£¼òµ¥Caseº¯ÊýºÍCaseË ......

LINQ to SQL¸üÐÂÊý¾Ý¿â²Ù×÷

ʹÓÃLINQ to SQL½¨Ä£NorthwindÊý¾Ý¿â
ÔÚÕâ֮ǰһÆðѧ¹ýLINQ to SQLÉè¼ÆÆ÷µÄʹÓã¬ÏÂÃæ¾ÍʹÓÃÈçϵÄÊý¾ÝÄ£ÐÍ£º
µ±Ê¹ÓÃLINQ to
SQLÉè¼ÆÆ÷Éè¼ÆÒÔÉ϶¨ÒåµÄÎå¸öÀࣨProduct£¬Category£¬Customer£¬OrderºÍOrderDetail£©µÄʱºò£¬Ã¿¸öÀàÖеÄÊôÐÔ
¶¼Ó³ÉäÁËÏàÓ¦Êý¾Ý¿âÖбíµÄÁУ¬Ã¿¸öÀàµÄʵÀýÔò´ú±íÁËÊý¾Ý¿â±íÖеÄÒ»Ìõ¼Ç¼¡£ÁíÍ⣬ ......

20100513.NETµ÷ÓÃSQL SERVER´æ´¢¹ý³Ì

¼¸¸ö´æ´¢¹ý³Ì£¬ºÜ¼òµ¥µÄ£¬µ«ÊÇÎÒ´ÓÀ´Ã»ÓÐѧϰ¹ý£¬ºÇºÇ£¬Õâ¸öÕýÊÇÎÒÒªÀ´ÅàѵµÄÄ¿µÄ
-- =============================================
-- Author:  
-- Create date: 2010Äê05ÔÂ12ÈÕ
-- Description: ´Ë¹ý³ÌÓÃÓÚ²éѯËùÓÐÓû§Ãû¼°ÃÜÂë
-- =============================================
CREATE PROCED ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ