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

½ÌÄãÍæתSQL Server´æ´¢¹ý³Ì

 Ê×ÏȽéÉÜÒ»ÏÂʲôÊÇ´æ´¢¹ý³Ì£º´æ´¢¹ý³Ì¾ÍÊǽ«³£ÓõĻòºÜ¸´ÔӵŤ×÷£¬Ô¤ÏÈÓÃSQLÓï¾äдºÃ²¢ÓÃÒ»¸öÖ¸¶¨µÄÃû³Æ´æ´¢ÆðÀ´£¬²¢ÇÒÕâÑùµÄÓï¾äÊÇ·ÅÔÚÊý¾Ý¿âÖеģ¬»¹¿ÉÒÔ¸ù¾ÝÌõ¼þÖ´Ðв»Í¬SQLÓï¾ä£¬ ÄÇôÒÔºóÒª½ÐÊý¾Ý¿âÌṩÓëÒѶ¨ÒåºÃµÄ´æ´¢¹ý³ÌµÄ¹¦ÄÜÏàͬµÄ·þÎñʱ£¬Ö»Ðèµ÷ÓÃexecute,¼´¿É×Ô¶¯Íê³ÉÃüÁî¡£
¡¡¡¡Çë´ó¼ÒÀ´Á˽âһϴ洢¹ý³ÌµÄÓï·¨¡£
¡¡¡¡create PROC [ EDURE ] procedure_name [ ; number ]
    [ { @parameter data_type }
        [ VARYING ] [ = default ] [ OUTPUT ]
    ] [ ,...n ]
¡¡¡¡[ WITH
    { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
¡¡¡¡[ FOR REPLICATION ]
¡¡¡¡AS sql_statement [ ...n ]
¡¡¡¡²ÎÊý£º
¡¡¡¡procedure_name
¡¡¡¡Ð´洢¹ý³ÌµÄÃû³Æ¡£¹ý³ÌÃû±ØÐë·ûºÏ±êʶ·û¹æÔò£¬ÇÒ¶ÔÓÚÊý¾Ý¿â¼°ÆäËùÓÐÕß±ØÐëΨһ¡£
¡¡¡¡Òª´´½¨¾Ö²¿ÁÙʱ¹ý³Ì£¬¿ÉÒÔÔÚ procedure_name Ç°Ãæ¼ÓÒ»¸ö±àºÅ·û (#procedure_name)£¬Òª´´½¨È«¾ÖÁÙʱ¹ý³Ì£¬¿ÉÒÔÔÚ procedure_name Ç°Ãæ¼ÓÁ½¸ö±àºÅ·û (##procedure_name)¡£ÍêÕûµÄÃû³Æ£¨°üÀ¨ # »ò ##£©²»Äܳ¬¹ý 128 ¸ö×Ö·û¡£Ö¸¶¨¹ý³ÌËùÓÐÕßµÄÃû³ÆÊÇ¿ÉÑ¡µÄ¡£
¡¡¡¡´æ´¢¹ý³ÌµÄÓŵ㶼ÓÐÄÄЩÄØ£¿
¡¡¡¡1.´æ´¢¹ý³ÌÖ»ÔÚ´´Ôìʱ½øÐбàÒë¼´¿É£¬ÒÔºóÿ´ÎÖ´Ðд洢¹ý³Ì¶¼²»ÐèÔÙÖØбàÒ룬¶øÎÒÃÇͨ³£Ê¹ÓõÄSQLÓï¾äÿִÐÐÒ»´Î¾Í±àÒëÒ»´Î,ËùÒÔʹÓô洢¹ý³Ì¿ÉÌá¸ßÊý¾Ý¿âÖ´ÐÐËٶȡ£
¡¡¡¡2.¾­³£»áÓöµ½¸´ÔÓµÄÒµÎñÂß¼­ºÍ¶ÔÊý¾Ý¿âµÄ²Ù×÷£¬Õâ¸öʱºò¾Í»áÓÃSPÀ´·â×°Êý¾Ý¿â²Ù×÷¡£µ±¶ÔÊý¾Ý¿â½øÐи´ÔÓ²Ù×÷ʱ(Èç¶Ô¶à¸ö±í½øÐÐupdate,insert,Query,deleteʱ£©£¬¿É½«´Ë¸´ÔÓ²Ù×÷Óô洢¹ý³Ì·â×°ÆðÀ´ÓëÊý¾Ý¿âÌṩµÄÊÂÎñ´¦Àí½áºÏÒ»ÆðʹÓ᣿ÉÒÔ¼«´óµÄÌá¸ßÊý¾Ý¿âµÄʹÓÃЧÂÊ£¬¼õÉÙ³ÌÐòµÄÖ´ÐÐʱ¼ä£¬ÕâÒ»µãÔڽϴóÊý¾ÝÁ¿µÄÊý¾Ý¿âµÄ²Ù×÷ÖÐÊǷdz£ÖØÒªµÄ¡£ÔÚ´úÂëÉÏ¿´£¬SQLÓï¾äºÍ³ÌÐò´úÂëÓï¾äµÄ·ÖÀ룬¿ÉÒÔÌá¸ß³ÌÐò´úÂëµÄ¿É¶ÁÐÔ¡£
¡¡¡¡3.´æ´¢¹ý³Ì¿ÉÒÔÉèÖòÎÊý£¬¿ÉÒÔ¸ù¾Ý´«Èë²ÎÊýµÄ²»Í¬Öظ´Ê¹ÓÃͬһ¸ö´æ´¢¹ý³Ì£¬´Ó¶ø¸ßЧµÄÌá¸ß´úÂëµÄÓÅ»¯ÂʺͿɶÁÐÔ¡£
¡¡¡¡4.°²È«ÐÔ¸ß,¿ÉÉ趨ֻÓÐij´ËÓû§²Å¾ßÓжÔÖ¸¶¨´æ´¢¹ý³ÌµÄʹÓÃȨ´æ´¢¹ý³ÌµÄÖÖÀࣺ
¡¡¡¡£¨1£©ÏµÍ³´æ´¢¹ý³Ì£ºÒÔsp_¿ªÍ·,ÓÃÀ´½øÐÐϵͳµÄ¸÷ÏîÉ趨.È¡µÃÐÅÏ¢.Ïà¹Ø¹ÜÀí¹¤×÷,Èç sp_help¾ÍÊÇÈ¡µÃÖ¸¶¨¶ÔÏóµÄÏà¹ØÐÅÏ¢¡£
¡¡¡¡£¨2£©À©Õ¹´æ´¢¹ý³Ì ÒÔXP_¿ªÍ·,ÓÃÀ´µ÷ÓòÙ×÷ϵͳÌṩµÄ¹¦ÄÜ
exec master..xp_cmdshel


Ïà¹ØÎĵµ£º

Êý¾Ý¿â»Ö¸´¹¤¾ß£¬Log Explorer for SQL Server v4.0

 
SQLÊý¾Ý»Ö¸´Èí¼þ Log Explorer for SQL Server v4.0
log explorerʹÓõļ¸¸öÎÊÌâ
¡¡¡¡1)¶ÔÊý¾Ý¿â×öÁËÍêÈ« ²îÒì ºÍÈÕÖ¾±¸·Ý
¡¡¡¡±¸·ÝʱѡÓÃÁËɾ³ýÊÂÎñÈÕÖ¾Öв»»î¶¯µÄÌõÄ¿
¡¡¡¡ÔÙÓÃLog explorer´òÊÔͼ¿´ÈÕ־ʱ
¡¡¡¡ÌáʾNo log recorders found that match the filter£¬would you like to view unfiltered ......

sqlÓï¾ä

                            SqlÓï¾ä
 
 1. ˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ£¬Ô´±íÃû£ºa£¬Ð±íÃû£ºb) SQL:select * into bfrom awhere 1<>1;
 2. ˵Ã÷£º¿½±´± ......

HibernateµÄÔ­ÉúSQL²éѯ

 ÕÛÌÚÁËÎÒ°ëÌìÖÕÓڸ㶨ÁË
²Î¿¼ÁËÕâ¸öÎÄÕ£ºhttp://doc.javanb.com/hibernate-reference-3-2-0-zh/ch16.html
final static String querySql = "select {enterprise.*}, {dict.*} ,{balancd.*}, {weightinfo.*}  "
   + "from weight_info weightinfo left outer join t_dict dict on {weightinf ......

50¸ö³£ÓÃsqlÓï¾ä

Student(S#,Sname,Sage,Ssex) ѧÉú±í
Course(C#,Cname,T#) ¿Î³Ì±í
SC(S#,C#,score) ³É¼¨±í
Teacher(T#,Tname) ½Ìʦ±í
ÎÊÌ⣺
1¡¢²éѯ“001”¿Î³Ì±È“002”¿Î³Ì³É¼¨¸ßµÄËùÓÐѧÉúµÄѧºÅ£»
  select a.S# from (select s#,score from SC where C#='001') a,(select s#,score
  fr ......

dzÎöSQL ServerÈý´óËã·¨µÄI/O³É±¾

 
1. Nested Loop Join(ǶÌ×Ñ­»·Áª½á)
Ëã·¨£º
Æä˼·Ï൱µÄ¼òµ¥ºÍÖ±½Ó£º¶ÔÓÚ¹ØϵRµÄÿ¸öÔª×é r ½«ÆäÓë¹ØϵSµÄÿ¸öÔª×é s ÔÚJOINÌõ¼þµÄ×Ö¶ÎÉÏÖ±½Ó±È½Ï²¢É¸Ñ¡³ö·ûºÏÌõ¼þµÄÔª×顣д³Éα´úÂë¾ÍÊÇ£º
´ú¼Û£º
±»Áª½áµÄ±íËù´¦ÄÚ²ã»òÍâ²ãµÄ˳Ðò¶Ô´ÅÅÌI/O¿ªÏúÓÐ×ŷdz£ÖØÒªµÄÓ°Ïì¡£¶øCPU¿ªÏúÏà¶ÔÀ´ËµÓ°Ïì½ÏС£¬Ö÷ÒªÊÇÔª×é¶ÁÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ