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

SQL SERVER2008Êý¾ÝÍÚ¾ò


¸ÅÊö
Microsoft SQL Server 2008 ÈÃÄúÄܹ»Í¨¹ýÖ±¹ÛµÄÊý¾ÝÍÚ¾òµÄÔ¤²âÐÔ·ÖÎöÀ´×ö³öÃ÷ÖǺÏÀíµÄ¾ö²ß£¬ÎÞ·ìµØÕûºÏ Microsoft ÉÌÒµÖÇÄÜƽ̨²¢¿ÉÀ©Õ¹ÖÁÉÌÒµÓ¦ÓóÌÐò¡£
ÖØ´óµÄй¦ÄÜ
ͬʱÀûÓôíÎóºÍ¾«È·¶ÈµÄͳ¼Æ·ÖÊýÀ´²âÊÔ¶à¸öÊý¾ÝÍÚ¾òÄ£ÐÍ£¬²¢ÀûÓý»²æÑéÖ¤À´È·ÈÏÆäÎȶ¨ÐÔ
ÔÚµ¥Ò»½á¹¹Öн¨Á¢¶à¸ö²»¼æÈݵÄÍÚ¾òÄ£ÐÍ¡¢ÔÚɸѡ¹ýµÄÊý¾ÝÖÐÓ¦ÓÃÄ£ÐÍ·ÖÎö¡¢Õë¶Ô½á¹¹Êý¾Ý½øÐвéѯÀ´³ÊÏÖÍêÕûµÄÐÅÏ¢£¬ÔöÇ¿ÐÍÍÚ¾ò½á¹¹»áÆôÓÃËùÓеÄÕâЩ¹¦ÄÜ
ʹÓøüÓÅÖʵÄʱ¼äÐòÁÐÖ§³ÖÀ´½áºÏÓÅ»¯µÄ¶ÌÆÚÔ¤²â (ARTXP) ÓëÎȶ¨µÄ³¤ÆÚÔ¤²â (ARIMA)£¬½«Á½ÕßµÄÓÅÊƽáºÏÔÚÒ»Æð
ʹÓùºÎïÀº·ÖÎöÀ´Ì½Ë÷¾­³£Ò»Æð¹ºÂòµÄÏîÄ¿Ö®¼äµÄ¹Øϵ¡¢²úÉú½»»¥Ê½´°ÌåÀ´Ê¹ÓÃÔ¤²âÐԵļÆËãÆ÷ΪÐµİ¸Àý¼Æ·Ö¡¢Ëæ×Å Office 2007 µÄ Microsoft SQL Server 2008 Êý¾ÝÍÚ¾ò¼ÓÔغêÒ»Æð´«µÝ
ÍêÕûÐÔ
 
½«Ö±¹ÛÐÔºÍÈ«ÃæÐÔµÄÉîÈëÔ¤²âÄÜÁ¦Ìṩ¸øËùÓÐÓû§£¬ÈÃÓû§¸ù¾Ý¶à·½ÐÅÏ¢×ö³ö¾ö²ß¡£
·á¸»ÇÒ´´ÐµÄËã·¨
Óû§»áÒòΪÐí¶à·á¸»ÇÒ´´ÐµÄÊý¾ÝÍÚ¾òËã·¨¶ø»ñÒæÁ¼¶à£¬ÕâЩËã·¨´ó¶àÊÇÓÉ Microsoft Ñо¿ÈËÔ±Ëù¿ª·¢£¬ÆäÄ¿µÄÊÇΪÁ˸ü¿ìËÙ²¢ÇÒ׼ȷµØÖ§³Ö³£¼ûµÄÉÌÒµÎÊÌâ¡£
¹ºÎïÀº·ÖÎö - ̽¾¿Ê¹ÓÃÕß¾­³£»áÒ»Æð¹ºÂòÄÄЩÏîÄ¿£¬ÒÔ±ã²úÉúʵʱµÄ²É¹º½¨Òé¼°ÅжϲúÆ·µÄλÖÃÈçºÎÖ±½ÓÓ°ÏìÓû§µÄ¹ºÂò¾ö²ß
¿Í»§Á÷ʧ·ÖÎö - Ô¤ÏÈ´¦Àí¿ÉÄܻῼÂÇÈ¡ÏûÆä·þÎñµÄ¿Í»§£¬²¢Ö¸³ö¿ÉÈÃÕâЩ¿Í»§ÁôÏÂÀ´µÄºÃ´¦
Êг¡·ÖÎö - ×Ô¶¯½«ÀàËƵĿͻ§·Ö×éÔÚÒ»ÆðÀ´¶¨ÒåÊг¡·Ö¸î¡£Ê¹ÓÃÕâЩϸ·ÖÊг¡¿ÉÑ°ÕÒÓлñÀû»ú»áµÄ¿Í»§
Ô¤²â - Ô¤²âÏúÊۺʹæ»õÊýÁ¿²¢Á˽âÁ½ÕßÖ®¼äµÄÏ໥¹ØÁªÐÔ£¬ÒÔ±ãÔ¤²âÆ¿¾±¼°Ìá¸ßÐÔÄÜ
Êý¾Ýä¯ÀÀ - ·ÖÎö²»Í¬¿Í»§Ö®¼äµÄ»ñÀû»ú»á£¬»òÊǽ«Æ«°®Í¬Ò»²úÆ·µ«Æ·ÅƲ»Í¬µÄ¿Í»§½øÐбȽϣ¬ÒÔ±ãÕÒ³öеĻú»á
ÎÞÈ˼ලµÄѧϰ·½Ê½ - Ö¸³öÆóÒµÄÚ²»Í¬ÔªËØÖ®¼äµÄÏÈǰδ֪¹Øϵ£¬ÈÃÄú¸ù¾Ý¶à·½Ç鱨×ö³ö¸üºÃµÄ¾ö²ß
ÍøÕ¾·ÖÎö - Á˽âÈËÃÇÈçºÎʹÓÃÄúµÄÍøÕ¾²¢½«ÀàËƵÄʹÓÃģʽ·Ö×éÔÚÒ»Æð£¬ÒÔ±ãÌṩ¸üºÃµÄʹÓþ­Ñé¸øÓû§
ÓªÏú»î¶¯·ÖÎö - Õë¶Ô×îÓпÉÄÜÏìÓ¦´ÙÏú»î¶¯µÄ¿Í»§½øÐдÙÏú£¬ÒÔ¸üÓÐЧµÄ·½Ê½Ê¹ÓÃÓªÏú¾­·Ñ
ÐÅÏ¢ÖÊÁ¿ - Ö¸³öÊý¾ÝÊäÈë»òÊý¾Ý¼ÓÔØÆÚ¼äµÄÒì³£Çé¿ö²¢¼ÓÒÔ´¦Àí£¬ÒÔÌá¸ßÐÅÏ¢µÄÖÊÁ¿
ÎÄ×Ö·ÖÎö - ·ÖÎö¶à·½Òâ¼û£¬ÒÔÕÒ³öÓйؿͻ§»òÔ±¹¤Ëù¹ØÐĵij£¼û»°ÌâºÍÇ÷ÊÆ£¬Ê¹ÓÃδ¾­¹ý×éÖ¯µÄÊäÈëÊý¾ÝÀ´×ö³ö¾ö²ß
È«ÃæÐԵĿª·¢»·¾³
¾ß±¸¿ÉÖ´ÐеÄÉîÈ붴²ìÁ¦£¬ÀûÓà Business Intelligence Development Studio (BIDS) À´¿ìËÙÇÒ¾«È·µØ×ö³ö¾ö²ß¡£
ʹÓÃÊý¾ÝÍÚ¾òÏòµ¼ºÍÊý¾ÝÍÚ¾òÉè¼Æ¹¤¾ßÀ´½¨Á¢¸´


Ïà¹ØÎĵµ£º

ʱ¼ä²î¼ÆËã: SQL Server DATEDIFF() º¯Êý

SQL Server DATEDIFF() º¯Êý
¶¨ÒåºÍÓ÷¨
DATEDIFF() º¯Êý·µ»ØÁ½¸öÈÕÆÚÖ®¼äµÄÌìÊý¡£
Óï·¨
DATEDIFF(datepart,startdate,enddate)
startdate ºÍ enddate ²ÎÊýÊǺϷ¨µÄÈÕÆÚ±í´ïʽ¡£
datepart ²ÎÊý¿ÉÒÔÊÇÏÂÁеÄÖµ£º
datepartËõд
Äê
yy, yyyy
¼¾¶È
qq, q
ÔÂ
mm, m
ÄêÖеÄÈÕ
dy, y
ÈÕ
dd, d
ÖÜ
wk, ww
ÐÇÆÚ ......

sql 2005 Ç¿ÖÆʹÓÃÖ´Ðмƻ® T—SQl

select * from tt t inner loop join ss s with(nolock) on s.c=t.c
 
 Ê¹Óà nested join
select * from tt t inner merge join ss s with(nolock) on s.c=t.c
 
 Ê¹Óà merge join
 
select * from tt t inner hash join ss s with(nolock) on s.c=t.c
 
ʹÓà hash jion
&n ......

SQLÄ£ºý²éѯÓï·¨LIKE


Ö´ÐÐ Êý¾Ý¿â²éѯʱ£¬ÓÐÍêÕû²éѯºÍÄ£ºý²éѯ֮·Ö¡£
Ò»°ãÄ£ºýÓï¾äÈçÏ£º
SELECT ×ֶΠfrom ±í WHERE ij×ֶΠLike Ìõ¼þ
ÆäÖйØÓÚÌõ¼þ£¬SQLÌṩÁËËÄÖÖÆ¥Åäģʽ£º
1£¬%£º±íʾÈÎÒâ0¸ö»ò¶à¸ö×Ö·û¡£¿ÉÆ¥ÅäÈÎÒâÀàÐͺͳ¤¶ÈµÄ×Ö·û£¬ÓÐЩÇé¿öÏÂÈôÊÇÖÐÎÄ£¬ÇëÔËÓÃÁ½¸ö°Ù·ÖºÅ£¨%%£©±íʾ¡£
±ÈÈç SELECT * from [user] WHERE u_na ......

¡¾×ª¡¿¹ØÓÚSQL Server2005Ö÷¼üºÍ¾Û´ØË÷ÒýÉèÖõÄÎÊÌâ

СµÜÏëÎʸöÎÊÌ⣬ÔÚSQL Server 2005ÉÏ£¬½¨Á¢Ö÷¼üµÄͬʱ¾Í»áĬÈÏÔÚÖ÷¼üÉÏÉèÖþ۴ØË÷Òý£¬ÄÇôÄÜ·ñÔÚÒ»¸ö×Ö¶ÎÉÏÉèÖÃÖ÷¼üºÍΨһÐÔË÷Òý£¨Unique£©£¬µ«ÊǰѾ۴ØË÷ÒýÉèÖõ½ÁíÒ»¸ö×Ö¶ÎÉÏ£¿
¾Ù¸ö¼òµ¥µÄÀý×Ó£¬±ÈÈçÎÒÓиö±í½ÐTableTest£¬±íÀïÓÐÁ½¸ö×ֶΣ¬id,date£¬±¾À´idÊÇÖ÷¼üµÄ£¬ÎÒÏÖÔÚÏë°Ñ¾Û´ØË÷ÒýÉèÖõ½date×Ö¶ÎÉÏ¡£
ÎÒÏÈɾ³ýÖ ......

SQL¾­µä×éºÏ²éѯ

´Ó²©¿ÍÔ°Öп´µ½Ò»ÆªÎÄÕ£¬½éÉÜ´óÈí¼þ¹«Ë¾ÃæÊÔʱ³£³£»á³öµÄÁ½µÀSQLÌ⣨¼û¸½Â¼£©¡£
ÎÒ¾õµÃÊÜÒæºÜ¶à£¬ÔÚ´Ë֮ǰ£¬ÎÒÒ»Ö±¾õµÃ£¬SQL2008ËƺõÌṩÁËÕâ·½ÃæµÄÖ§³Ö£¬µ«¸üµÍµÄ°æ±¾£¬°üÀ¨2005£¬·ÇÓαê×ö²»³öÀ´£¨Ë®Æ½¹»²Ë£©¡£×ܽáÐĵÃÈçÏ£º
1¡¢    Ç¿´óµÄgroup by
1  select stdname,
2  isnull( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ