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

SQLÓαêÔ­ÀíºÍʹÓ÷½·¨(ת)

ÔÚÊý¾Ý¿â¿ª·¢¹ý³ÌÖУ¬µ±Äã¼ìË÷µÄÊý¾ÝÖ»ÊÇÒ»Ìõ¼Ç¼ʱ£¬ÄãËù±àдµÄÊÂÎñÓï¾ä´úÂëÍùÍùʹÓÃSELECT INSERT Óï¾ä¡£µ«ÊÇÎÒÃdz£³£»áÓöµ½ÕâÑùÇé¿ö£¬¼´´Óijһ½á¹û¼¯ÖÐÖðÒ»µØ¶ÁÈ¡Ò»Ìõ¼Ç¼¡£ÄÇôÈçºÎ½â¾öÕâÖÖÎÊÌâÄØ£¿ÓαêΪÎÒÃÇÌṩÁËÒ»ÖÖ¼«ÎªÓÅÐãµÄ½â¾ö·½°¸¡£ 1.1 ÓαêºÍÓαêµÄÓŵã ÔÚÊý¾Ý¿âÖУ¬ÓαêÊÇÒ»¸öÊ®·ÖÖØÒªµÄ¸ÅÄî¡£ÓαêÌṩÁËÒ»ÖÖ¶Ô´Ó±íÖмìË÷³öµÄÊý¾Ý½øÐвÙ×÷µÄÁé»îÊֶΣ¬¾Í±¾ÖʶøÑÔ£¬Óαêʵ¼ÊÉÏÊÇÒ»ÖÖÄÜ´Ó°üÀ¨¶àÌõÊý¾Ý¼Ç¼µÄ½á¹û¼¯ÖÐÿ´ÎÌáÈ¡Ò»Ìõ¼Ç¼µÄ»úÖÆ¡£Óαê×ÜÊÇÓëÒ»ÌõT_SQL Ñ¡ÔñÓï¾äÏà¹ØÁªÒòΪÓαêÓɽá¹û¼¯£¨¿ÉÒÔÊÇÁãÌõ¡¢Ò»Ìõ»òÓÉÏà¹ØµÄÑ¡ÔñÓï¾ä¼ìË÷³öµÄ¶àÌõ¼Ç¼£©ºÍ½á¹û¼¯ÖÐÖ¸ÏòÌض¨¼Ç¼µÄÓαêλÖÃ×é³É¡£µ±¾ö¶¨¶Ô½á¹û¼¯½øÐд¦Àíʱ£¬±ØÐëÉùÃ÷Ò»¸öÖ¸Ïò¸Ã½á¹û¼¯µÄÓαꡣÈç¹ûÔø¾­Óà C ÓïÑÔд¹ý¶ÔÎļþ½øÐд¦ÀíµÄ³ÌÐò£¬ÄÇôÓαê¾ÍÏñÄú´ò¿ªÎļþËùµÃµ½µÄÎļþ¾ä±úÒ»Ñù£¬Ö»ÒªÎļþ´ò¿ª³É¹¦£¬¸ÃÎļþ¾ä±ú¾Í¿É´ú±í¸ÃÎļþ¡£¶ÔÓÚÓαê¶øÑÔ£¬ÆäµÀÀíÊÇÏàͬµÄ¡£¿É¼ûÓαêÄܹ»ÊµÏÖ°´Ó봫ͳ³ÌÐò¶ÁȡƽÃæÎļþÀàËƵķ½Ê½´¦ÀíÀ´×Ô»ù´¡±íµÄ½á¹û¼¯£¬´Ó¶ø°Ñ±íÖÐÊý¾ÝÒÔƽÃæÎļþµÄÐÎʽ³ÊÏÖ¸ø³ÌÐò¡£ ÎÒÃÇÖªµÀ¹ØϵÊý¾Ý¿â¹ÜÀíϵͳʵÖÊÊÇÃæÏò¼¯ºÏµÄ£¬ÔÚMS SQL SERVER Öв¢Ã»ÓÐÒ»ÖÖÃèÊö±íÖе¥Ò»¼Ç¼µÄ±í´ïÐÎʽ£¬³ý·ÇʹÓÃwhere ×Ó¾äÀ´ÏÞÖÆÖ»ÓÐÒ»Ìõ¼Ç¼±»Ñ¡ÖС£Òò´ËÎÒÃDZØÐë½èÖúÓÚÓαêÀ´½øÐÐÃæÏòµ¥Ìõ¼Ç¼µÄÊý¾Ý´¦Àí¡£ Óɴ˿ɼû£¬ÓαêÔÊÐíÓ¦ÓóÌÐò¶Ô²éѯÓï¾äselect ·µ»ØµÄÐнá¹û¼¯ÖÐÿһÐнøÐÐÏàͬ»ò²»Í¬µÄ²Ù×÷£¬¶ø²»ÊÇÒ»´Î¶ÔÕû¸ö½á¹û¼¯½øÐÐͬһÖÖ²Ù×÷£»Ëü»¹Ìṩ¶Ô»ùÓÚÓαêλÖöø¶Ô±íÖÐÊý¾Ý½øÐÐɾ³ý»ò¸üеÄÄÜÁ¦£»¶øÇÒ£¬ÕýÊÇÓαê°Ñ×÷ΪÃæÏò¼¯ºÏµÄÊý¾Ý¿â¹ÜÀíϵͳºÍÃæÏòÐеijÌÐòÉè¼ÆÁ½ÕßÁªÏµÆðÀ´£¬Ê¹Á½¸öÊý¾Ý´¦Àí·½Ê½Äܹ»½øÐйµÍ¨¡£ 1.2 ÓαêÖÖÀà MS SQL SERVER Ö§³ÖÈýÖÖÀàÐ͵ÄÓα꣺Transact_SQL Óα꣬API ·þÎñÆ÷ÓαêºÍ¿Í»§Óαꡣ£¨1£© Transact_SQL Óαê Transact_SQL ÓαêÊÇÓÉDECLARE CURSOR Óï·¨¶¨Òå¡¢Ö÷ÒªÓÃÔÚTransact_SQL ½Å±¾¡¢´æ´¢¹ý³ÌºÍ´¥·¢Æ÷ÖС£Transact_SQL ÓαêÖ÷ÒªÓÃÔÚ·þÎñÆ÷ÉÏ£¬ÓÉ´Ó¿Í»§¶Ë·¢Ë͸ø·þÎñÆ÷µÄTransact_SQL Óï¾ä»òÊÇÅú´¦Àí¡¢´æ´¢¹ý³Ì¡¢´¥·¢Æ÷ÖеÄTransact_SQL ½øÐйÜÀí¡£ Transact_SQL Óα겻֧³ÖÌáÈ¡Êý¾Ý¿é»ò¶àÐÐÊý¾Ý¡££¨2£© API Óαê API ÓαêÖ§³ÖÔÚOLE DB£¬ ODBC ÒÔ¼°DB_library ÖÐʹÓÃÓα꺯Êý£¬Ö÷ÒªÓÃÔÚ·þÎñÆ÷ÉÏ¡£Ã¿Ò»´Î¿Í»§¶ËÓ¦ÓóÌÐòµ÷ÓÃAPI Óα꺯Êý£¬MS SQL SEVER µÄOLE DB ÌṩÕß¡¢ODBCÇý¶¯Æ÷»òDB_library µÄ¶¯Ì¬Á´½Ó¿â£¨DLL£© ¶¼»á½«ÕâЩ¿Í»§ÇëÇó´«ËÍ


Ïà¹ØÎĵµ£º

ʹÓÃc#´´½¨sql serverµÄ´æ´¢¹ý³Ì_c#Ó¦ÓÃ1

½éÉÜ
ͨ³££¬Ñз¢ÈËԱʹÓõÄÊÇT-SQLÀ´´´½¨SQL ServerµÄ´æ´¢¹ý³Ì¡¢º¯ÊýºÍ´¥·¢Æ÷¡£ ¶øÏÖÔÚµÄSQL Server 2005ÒÑÍêÈ«Ö§³Ö.NETͨÓÃÓïÑÔÔËÐÐʱ£¨CLR£©ÁË¡£ Õâ¾ÍÒâζ×Å£¬ÄúÄܹ»Ê¹ÓÃ.NETµÄÓïÑÔ£¬ÈçC#¡¢VB.NETÖ®ÀàµÄÀ´Ñз¢SQL ServerµÄ´æ´¢¹ý³Ì¡¢º¯ÊýºÍ´¥·¢Æ÷¡£ SQL Server ºÍ CLR µÄ¼¯³É¸øÎÒÃÇ´øÀ´ÁËn¶àºÃ´¦£¬Èçʵʱ±àÒë¡¢ÀàÐÍ°²È«¡ ......

¹ØÓÚSQLÖÐÓÃJoin in ²éѯµÄÓ÷¨


ÍâÁª½Ó:ÍâÁª½Ó¿ÉÒÔÊÇ×óÏòÍâÁª½Ó¡¢ÓÒÏòÍâÁª½Ó»òÍêÕûÍⲿÁª½Ó¡£
ÔÚ   from   ×Ó¾äÖÐÖ¸¶¨ÍâÁª½Óʱ£¬¿ÉÒÔÓÉÏÂÁм¸×é¹Ø¼ü×ÖÖеÄÒ»×éÖ¸¶¨£º   
 LEFT   JOIN   »ò   LEFT   OUTER   JOIN;    
×óÏòÍâÁª½ÓµÄ½á¹û¼¯°üÀ ......

(ÍøÕª)SQL·ÖÒ³Óï¾ä


֮ǰżȻ¹äÍøÒ³µÄʱºò¿´µ½µÄ,ÏêϸµÄÍøÖ·Íü¼Çcopy¹ýÀ´ÁË£¬ÕæÊDZ§Ç¸¡£¾õµÃ¼òµ¥Ò׶®,ËùÒÔתÁË,ÎûÎû
ÓйطÖÒ³ SQL µÄ×ÊÁϺܶ࣬ÓеÄʹÓô洢¹ý³Ì£¬ÓеÄʹÓÃÓαꡣ±¾È˲»Ï²»¶Ê¹ÓÃÓα꣬ÎÒ¾õµÃËüºÄ×Ê¡¢Ð§Âʵͣ»Ê¹Óô洢¹ý³ÌÊǸö²»´íµÄÑ¡Ôñ£¬ÒòΪ´æ´¢¹ý³ÌÊǾ­¹ýÔ¤±àÒëµÄ£¬Ö´ÐÐЧÂʸߣ¬Ò²¸üÁé»î¡£ÏÈ¿´¿´µ¥Ìõ SQL Óï¾äµÄ·ÖÒ³ SQL ......

SQL Server 2005ÖеÄCLR(2)

ÎÄÕµ¼º½ SQL Server 2005 ѧϰ±Ê¼ÇϵÁÐÎÄÕµ¼º½
       ÕâÒ»½ÚÔÛÃÇÀ´ËµËµClRµÄÐÔÄÜ£¬ÎÒÃDz»ÄÜֻʹÓÃËü¶ø²»È¥¿¼Âǵ½µÍ ΪʲôҪʹÓÃËü»òÊÇÔÚʲôʱºòÓ¦¸ÃʹÓÃËü£¬ÏñÎÒ֮ǰдµÄº¯ÊýµÃµ½Ò»¸ö×Ö·ûµÄ³¤¶ÈµÄ·½·¨¾ÍûÓÐÌ«´ó±ØÒªÁË£¬µ«Èç¹ûÊÇÏñ²ð·Ö×Ö·ûÕâÑùµÄ·½·¨Ó¦¸Ã¾ÍÓбØÒªÁË£¬±ÈÈçc#ÀïµÄSplit ......

SQL SERVER º¯Êý£¨×ª£©

SQLServer»ù±¾º¯Êý
1.×Ö·û´®º¯Êý £º
×Ö·û²Ù×÷Àà £º
upper(char_expr) תΪ´óд
lower(char_expr) תΪСд
UCase(string) ·µ»Ø Variant (String)£¬ÆäÖаüº¬×ª³É´óдµÄ×Ö·û´®¡£
LCase(string) ·µ»Ø×Ö·û´®µÄСдÐÎʽ¡£
space(int_expr) Éú³Éint_expr¸ö¿Õ¸ñ
replicate(char_expr,int_expr) ¸´ÖÆ×Ö·û´®int_expr´Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ