C#ÏîÄ¿´ò°ü£¬²¢×Ô¶¯°²×°SQLÊý¾Ý¿â
ӦһλÍøÓѵÄÐèÇ󣬲¢ÐÞÕýÁËMVPÀîºé¸ù".NETƽ̨ÏÂWEBÓ¦ÓóÌÐòµÄ²¿Êð(°²×°Êý¾Ý¿âºÍ×Ô¶¯ÅäÖÃ)"ÖеÄosqlÓ÷¨´íÎó£¬ÒѲâÊÔͨ¹ý¡£
Ò»).´´½¨²¿ÊðÏîÄ¿
1. ÔÚ“Îļþ”²Ëµ¥ÉÏÖ¸Ïò“Ìí¼ÓÏîÄ¿”£¬È»ºóÑ¡Ôñ“н¨ÏîÄ¿”¡£
2. ÔÚ“Ìí¼ÓÐÂÏîÄ¿”¶Ô»°¿òÖУ¬Ñ¡Ôñ“ÏîÄ¿ÀàÐÍ”´°¸ñÖеē°²×°ºÍ²¿ÊðÏîÄ¿”£¬È»ºóÑ¡Ôñ“Ä£°å”´°¸ñÖеē°²×°ÏîÄ¿”¡£ÔÚ“Ãû³Æ”¿òÖмüÈë setup1¡£
3. µ¥»÷“È·¶¨”¹Ø±Õ¶Ô»°¿ò¡£
4. ÏîÄ¿±»Ìí¼Óµ½½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷ÖУ¬²¢ÇÒÎļþϵͳ±à¼Æ÷´ò¿ª¡£
5. ÔÚ“ÊôÐÔ”´°¿ÚÖУ¬Ñ¡Ôñ ProductName ÊôÐÔ£¬²¢¼üÈë ÐÅÏ¢¹ÜÀíϵͳ ¡£
¶þ).½« Ö÷³ÌÐò ÏîÄ¿µÄÊä³öÌí¼Óµ½²¿ÊðÏîÄ¿ÖÐ
1. ÔÚ“Îļþϵͳ±à¼Æ÷”ÖУ¬Ñ¡Ôñ“Ó¦ÓóÌÐòÎļþ¼Ð”¡£ÔÚ“²Ù×÷”²Ëµ¥ÉÏ£¬Ö¸Ïò“Ìí¼Ó”£¬È»ºóÑ¡Ôñ“ÏîÄ¿Êä³ö”¡£
2. ÔÚ“Ìí¼ÓÏîÄ¿Êä³ö×锶Ի°¿òÖУ¬Ñ¡Ôñ“ÏîÄ¿”ÏÂÀÁбíÖеēÄãµÄ³ÌÐò”¡£
3. µ¥»÷“È·¶¨”¹Ø±Õ¶Ô»°¿ò¡£
4. ´ÓÁбíÖÐÑ¡Ôñ“Ö÷Êä³ö”ºÍ“ÄÚÈÝÎļþ”×飬Ȼºóµ¥»÷“È·¶¨”¡£
Èý).´´½¨°²×°³ÌÐòÀà
1. ÔÚ“Îļþ”²Ëµ¥ÉÏÖ¸Ïò“н¨”£¬È»ºóÑ¡Ôñ“ÏîÄ¿”¡£
2. Ôړн¨ÏîÄ¿”¶Ô»°¿òÖУ¬Ñ¡Ôñ“ÏîÄ¿ÀàÐÍ”´°¸ñÖеēVisual Basic ÏîÄ¿”£¬È»ºóÑ¡Ôñ“Ä£°å”´°¸ñÖеēÀà¿â”¡£ÔÚ“Ãû³Æ”¿òÖмüÈë installDB¡£
3. µ¥»÷“´ò¿ª”¹Ø±Õ¶Ô»°¿ò¡£
4. ´Ó“ÏîÄ¿”²Ëµ¥ÖÐÑ¡Ôñ“Ìí¼ÓÐÂÏ£
5. ÔÚ“Ìí¼ÓÐÂÏԻ°¿òÖÐÑ¡Ôñ“°²×°³ÌÐòÀà”¡£ÔÚ“Ãû³Æ”¿òÖмüÈë installDB¡£
6. µ¥»÷“È·¶¨”¹Ø±Õ¶Ô»°¿ò¡£
7. Ïêϸ´úÂ븽ºó¡£
ËÄ).´´½¨×Ô¶¨Òå°²×°¶Ô»°¿ò
1. ÔÚ½â¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷ÖÐÑ¡Ôñ“setup1”ÏîÄ¿¡£ÔÚ“ÊÓͼ”²Ëµ¥ÉÏÖ¸Ïò“±à¼Æ÷”£¬È»ºóÑ¡Ôñ“Óû§½çÃ攡£
2. ÔÚÓû§½çÃæ±à¼Æ÷ÖУ¬Ñ¡Ôñ“°²×°”ϵēÆô¶¯”½Úµã¡£ÔÚ“²Ù×÷”²Ëµ¥ÉÏ£¬Ñ¡Ôñ“Ìí¼Ó¶Ô»°¿ò”¡£
3. ÔÚ“Ìí¼Ó¶Ô»°¿ò”¶Ô»°¿òÖУ¬Ñ¡Ôñ“Ðí¿ÉÐÒ锶Ի°¿
Ïà¹ØÎĵµ£º
½ñÌìÔÚÅäÖÃÊý¾Ý¿â·¢²¼ºÍ·Ö·¢Ê±×ÜÊDZ¨³öÏÖ 18483 ´íÎó
Ìáʾ˵£º´íÎó 18483:δÄÜÁ¬½Óµ½·þÎñÆ÷ "XXX"£¬ÒòΪ 'distributor_admin'δÔڸ÷þÎñÆ÷É϶¨ÒåΪԶ³ÌµÇ½¡£
Îҵķ¢²¼ºÍ·Ö·¢ÊÇͬһ¸ö·þÎñÆ÷£¬"XXX" ΪÎҵĻúÆ÷Ãû£¬·Ö·¢Êý¾Ý¿âÊÇĬÈϵÄÃû³Æ£¬¶øÎÒÔÚÁíÍâһ̨»úÆ÷ÉÏ×öʱ¾ÍÕý³£¡£
1¡¢ÉèÖù²Ïí¸´ÖÆĿ¼:
......
¶¨ÒåºÍÓ÷¨
DATEDIFF() º¯Êý·µ»ØÁ½¸öÈÕÆÚÖ®¼äµÄÌìÊý¡£
Óï·¨
DATEDIFF(datepart,startdate,enddate)
startdate ºÍ enddate ²ÎÊýÊǺϷ¨µÄÈÕÆÚ±í´ïʽ¡£
datepart ²ÎÊý¿ÉÒÔÊÇÏÂÁеÄÖµ£º
datepart
Ëõд
Äê
yy, yyyy
¼¾¶È
qq, q
ÔÂ
mm, m
ÄêÖеÄÈÕ
dy, y
ÈÕ
dd, d
ÖÜ
wk, ww
ÐÇÆÚ
dw, w
Сʱ
h ......
±¾ÎÄÑÝʾÁË SQL Server 2008 ·ÖÇø±íʵÀý;
1. ´´½¨²âÊÔÊý¾Ý¿â £»
2. ´´½¨·ÖÇøº¯Êý;
3. ´´½¨·ÖÇø¼Ü¹¹;
4. ´´½¨·ÖÇø±í;
5. ´´½¨·ÖÇøË÷Òý ;
6. ·ÖÇøÇл» ;
7. ²éѯÄÄЩ±íʹÓÃÁË·ÖÇø±í£»
-- ×÷³ÉÕß leno
-- ÈÕÆÚ: 2009-06-06 23:50:01.700
-- ......
ÏÈ˵˵ÕâЩÎóÇø¡£Ëùν“ÎóÇø”£¬ÓÐһЩÊÇÐÂÊÖºÜÈÝÒ×·¸µÄ´íÎó»òÕߺÜÈÝÒ׺öÂÔµÄÎÊÌ⣬ÁíÍâһЩ£¬ÔòÊÇÏñ“ºÄ×Ó³ÔÁËÑλá±ä³Éòùòð”Ò»Ñù£¬ÈÃÎÒÃÇ´ÓС¾ÍÈÏΪÊÇÕýÈ·µÄÊÂÇé¡£ÈçÏ£º
1¡¢ ±íÉϲ»¹ÜÓõÃ×ÅÓò»×Å£¬¶¼¼Ó¸ö¾Û¼¯Ë÷Òý¡£
ÎÒÃÇÖªµÀ£¬±íÒÔÁ½ÖÖ·½Ê½×éÖ¯ÎïÀí´æ´¢£ºÓоۼ¯Ë÷ÒýµÄ“¾Û¼¯± ......