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

sql ´óÁ¿Êý¾Ý²éѯµÄ ÓÅ»¯´ëÊ©

¿´µ½µÄһƪ¹ØÓÚÊý¾Ý¿âÓÅ»¯µÄÎÄÕ£¬¾õµÃ¶Ô×Ô¼ºÓаïÖú£¬¾ÍתÌûµ½ÕâÀιʶø֪У¡    
    
  ÓÅ»¯Êý¾Ý¿âµÄ˼Ïë¼°SQLÓï¾äÓÅ»¯µÄÔ­Ôò   [תÌù   2005-08-18   14:20:05   ]   ·¢±íÕß:   chilizy        
   
  ÓÅ»¯Êý¾Ý¿âµÄ˼Ï룺  
      ================  
      1¡¢¹Ø¼ü×ֶν¨Á¢Ë÷Òý¡£  
      2¡¢Ê¹Óô洢¹ý³Ì£¬ËüʹSQL±äµÃ¸ü¼ÓÁé»îºÍ¸ßЧ¡£  
      3¡¢±¸·ÝÊý¾Ý¿âºÍÇå³ýÀ¬»øÊý¾Ý¡£  
      4¡¢SQLÓï¾äÓï·¨µÄÓÅ»¯¡££¨¿ÉÒÔÓÃSybaseµÄSQL   Expert£¬¿ÉϧÎÒûÕÒµ½unexpiredµÄ  
  ÐòÁкţ©  
      5¡¢ÇåÀíɾ³ýÈÕÖ¾¡£  
   
      SQLÓï¾äÓÅ»¯µÄÔ­Ôò£º      
      ==================  
      1¡¢Ê¹ÓÃË÷ÒýÀ´¸ü¿ìµØ±éÀú±í¡£  
      ȱʡÇé¿öϽ¨Á¢µÄË÷ÒýÊÇ·ÇȺ¼¯Ë÷Òý£¬µ«ÓÐʱËü²¢²»ÊÇ×î¼ÑµÄ¡£ÔÚ·ÇȺ¼¯Ë÷ÒýÏ£¬Êý¾ÝÔÚÎïÀíÉÏËæ»ú´æ·ÅÔÚÊý¾ÝÒ³ÉÏ¡£ºÏÀíµÄË÷ÒýÉè¼ÆÒª½¨Á¢ÔÚ¶Ô¸÷ÖÖ²éѯµÄ·ÖÎöºÍÔ¤²âÉÏ¡£Ò»°ãÀ´Ëµ£º  
      ¢Ù.ÓдóÁ¿Öظ´Öµ¡¢ÇÒ¾­³£Óз¶Î§²éѯ  
      £¨between,   >   ,<   £¬>   =,<   =£©ºÍorder   by¡¢group   by·¢ÉúµÄÁУ¬¿É¿¼Âǽ¨Á¢Èº¼¯Ë÷Òý£»  
      ¢Ú.¾­³£Í¬Ê±´æÈ¡¶àÁУ¬ÇÒÿÁж¼º¬ÓÐÖظ´Öµ¿É¿¼Âǽ¨Á¢×éºÏË÷Òý£»  
      ¢Û.×éºÏË÷ÒýÒª¾¡Á¿Ê¹¹Ø¼ü²éѯÐγÉË÷Òý¸²¸Ç£¬ÆäÇ°µ¼ÁÐÒ»¶¨ÊÇʹÓÃ×îƵ·±µÄÁС£Ë÷ÒýËäÓÐÖúÓÚÌá¸ßÐÔÄܵ«²»ÊÇË÷ÒýÔ½¶àÔ½ºÃ£¬Ç¡ºÃÏà·´¹ý¶àµÄË÷Òý»áµ¼ÖÂϵͳµÍЧ¡£Óû§ÔÚ±íÖÐÿ¼Ó½øÒ»¸öË÷Òý£¬Î¬»¤Ë÷Òý¼¯ºÏ¾ÍÒª×öÏàÓ¦µÄ¸üй¤×÷¡£  
      2¡¢IS   NULL   Óë   IS   NOT   NULL  
      ²»ÄÜÓÃnull×÷Ë÷Òý£¬Èκΰüº¬nullÖµµÄÁж¼½«²»»á±»°üº¬ÔÚË÷ÒýÖС£¼´Ê¹Ë÷ÒýÓжàÁÐÕâÑùµÄÇé¿öÏ£¬Ö»ÒªÕâЩÁÐÖÐÓÐÒ»Áк¬ÓÐnull£¬¸ÃÁоͻá´ÓË÷ÒýÖÐÅųý¡£Ò²¾ÍÊÇ˵Èç¹ûijÁдæÔÚ¿ÕÖµ£¬¼´Ê¹¶Ô¸ÃÁн¨Ë÷ÒýÒ²²»»áÌá¸ßÐÔÄ


Ïà¹ØÎĵµ£º

sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð


 
sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð
×òÌìÃæÊÔ8Ò³±ÊÊÔÌâÄ¿,»ù±¾É϶¼ÊÇSQl µÄ,ÌرðÊÇÕ⼸¸öÇø±ð,¼ÇµÃ²»ÊǺÜÇåÎú,Ö»¼ÇµÃleftÊÇÒÔ×ó±íΪÖ÷±í,
rightÒÔÓÒ±íΪÖ÷±í,µ¼ÖÂ×ö´íÁ˼¸¸ö!½ñÌìËÑÁËÏÂ!×ÜËãŪÇå³þÁË!ÒÔÏÂÊÇתÌû!
left join(×óÁª½Ó) ·µ»Ø°üÀ¨×ó±íÖеÄËùÓмǼºÍÓÒ±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
right j ......

¶ÀÁ¢µÄSQL ½Å±¾¹¤¾ß:QweryBuilder

ÍøÕ¾£ºhttp://werysoft.com/
Èç¹ûÄú±ØÐë¹ÜÀí»·¾³ÖеĶàÖÖÀàÐ͵ÄÊý¾Ý¿â·þÎñÆ÷£¬ÔòʹÓü¯ÖÐʽ¹¤¾ßµ÷ÕûËùÓÐÊý¾Ý¿â¿ÉÄÜ»á±È½Ï·½±ã¡£Werysoft µÄ QweryBuilder Ö¼ÔÚΪÄúÌṩ´ËÏÄÜ¡£Äú¿ÉÒÔʹÓÃËü´Óͬһ GUI Á¬½Óµ½ Microsoft SQL Server¡¢Sybase ASE¡¢SQL Anywhere ºÍ Oracle ʵÀý£¬È»ºó²é¿´¡¢´´½¨¡¢¸üкÍɾ³ýÊý¾Ý¿â½Å±¾¡¢¼Ü ......

LINQ to SQL ѧϰreference

http://weblogs.asp.net/scottgu/archive/2007/09/07/linq-to-sql-part-9-using-a-custom-linq-expression-with-the-lt-asp-linqdatasource-gt-control.aspx
1-9 parts are the most useful knowledge for you so far. ......

SQL²éѯÅóÓѹØϵȦӦÓÃʵÀý

Ô­Ìù£ºhttp://topic.csdn.net/u/20100412/11/a4ea520e-7dd0-44d2-98bb-9f62f0ed6160.html?21233
--------------------------------------------------------------------------
--  Author : htl258(Tony)
--  Date   : 2010-04-14 06:02:36
--  Version:Microsoft SQL Server 2008 (RTM) - 1 ......

Sql Serverµ¼³öÎı¾Îļþ

ÏÈ¿ªÆô·þÎñÆ÷ÅäÖÃÑ¡Ï
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', 1
RECONFIGURE
/** µ¼³öÎı¾Îļþ 
EXEC master..xp_cmdshell 'bcp dbname..tablename out c:\DT.txt -c -S servername -U sa -P password' 
»ò 
EXEC master..xp_cmdshell ' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ