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

ÔõÑùʹÓÃSQLÓï¾ä¸üÐÂÐÐÀÛ¼ÆÁÐÖµ

 
±í:TABLEA
¿Í»§±àºÅ Ó¦ÊÕ½ð¶î   ÊÕ¿î½ð¶î 
1001       100        80         
1001       200       180         
1001       300       280         
1001       400       380         
..         ..         ..         
ÐÐÊý²»È·¶¨,½ð¶îÒ²²»È·¶¨
ÈçºÎ²éѯ²ÅÄܵõ½ÕâÑùµÄ½á¹¹:
¿Í»§±àºÅ Ó¦ÊÕ½ð¶î   ÊÕ¿î½ð¶î   Ê£Óà½ð¶î
1001       100        80          20
1001       200       180          40
1001       300       280          60
1001       400       380          80
..         ..         ..          ..
ÈçºÎ²ÅÄÜʵÏÖ Ê£Óà½ð¶î ÕâÑùµÄ½á¹û
ʹÓÃÒ»¸ö¸üÐÂÓï¾ä¼´¿É½â¾ö¡£´úÂëÈçÏ£º
declare @a int
set @a = 0
update TABLE1 set
@a = @a + Ó¦ÊÕ½ð¶î - ÊÕ¿î½ð¶î,
Ê£Óà½ð¶î = @a


Ïà¹ØÎĵµ£º

Sql Server·¢ÓʼþÅäÖÃ

¡¡Ç°Ì᣺°²×°sqlserver£¬°²×°outlook£¬outlookÒѾ­ÕýÈ·ÅäÖá£
    £¨1£©ÅäÖÃsqlserverµÄÆô¶¯Óû§ÎªÓòÓû§¡£sqlserverÆô¶¯Ä¬Èϵı¾µØÕË»§£¬±¾µØÕË»§Æô¶¯µÄ·þÎñÊÇÎÞ·¨Íê³ÉÓʼþµÄ·¢ËͽÓÊܹ¦Äܵġ£
     ÅäÖÃÓòÓû§Æô¶¯£º´ò¿ª¿ØÖÆÃæ°åµÄ--¹ÜÀí¹¤¾ß--·þÎñ£¬ÕÒµ½sqlserver·þÎñ£¬²é¿´ÊôÐÔ¡£Ô ......

Sql Server2005ʵÏÖÔ¶³Ì±¸·ÝÊý¾Ý¿â

 
ÏàÐÅ´ó¼Ò¶¼ÔÚµ±ÐÄÊý¾Ý¿âµÄ¶ªÊ§£¬ÕâÒ²ÊÇÿ¸ö¿ª·¢ÕßÍ·Í´µÄÒ»¼þʼþ£¬ÒòΪÕýÔÚÔËÐеķþÎñÆ÷¼°Êý¾Ý¿âÒ²ÔÚÕą̂·þÎñÆ÷ÉÏ¡£Èç¹û·þÎñÆ÷±ÀÀ££¬ÄÇôËùÓеÄÊý¾Ý
¶¼²»´æÔÚÁË£¬¾ÍËãÊÇÄãÔÚÄãµÄ»ú×ÓÉÏ×öÁ˱¸·Ý£¬ÄÇÒ²ÊÇûÓÐÓõģ¬ÎªÊ²Ã´»áÕâÑù˵Ö÷ÒªÊÇÒòΪ±¾»úÊÇÏò»¥ÁªÍø¹«¿ªµÄ£¬ËùÒÔ³öʹʵĸÅÂʾͱȽϸߡ£×îÖÕÎÒÃÇ¿ÉÒÔÀû
ÓþÖÓò ......

SQL Server Ë«»úÈȱ¸1(based on log shipping)

        ÈÕÖ¾´«ËÍÊÇSQL SERVER2000ÆóÒµ°æ½øÐÐË«»úÈȱ¸µÄÒ»¸öÖ÷Òª½â¾ö·½°¸£¬ÆäÔ­Àí±È½Ï¼òµ¥£¬ÊµÏÖÒ²±È½Ï·½±ã£¬Ö»ÊÇÓÉÓÚºÍWindowsÖ®¼ä´í×Û¸´ÔӵĹØϵ£¬µ¼ÖÂÉèÖÃÆðÀ´Óв»ÉÙÀ§ÄÑ£¬³öÏÖÎÊÌâÒ²²»ÈÝÒ×Õï¶Ï¡£
1.ʵÏÖ¸ÅÊö
 *Ë«»úÈȱ¸Õë¶ÔµÄÊǾßÌåµÄij¸öÊý¾Ý¿â¶ø²»ÊÇÕû¸ö·þÎñÆ÷
 Ë«» ......

SQL Server 2008 Spatial, PostgreSQL/PostGIS 1.3

General Overview
FeatureSQL Server 2008 (RC0)MySQL 5.1/6PostgreSQL 8.3/PostGIS 1.3/1.4
OS
Windows XP, Windows Vista, Windows 2003, Windows 2008
Windows XP, Windows Vista, (haven't tested on 2008), Linux, Unix, Mac
Windows 2000+ (including Vista and 2003, haven't tested on 2008), Linux, Unix, Ma ......

Sql serverÖÐʱ¼äº¯ÊýÓ÷¨Ïê½â

SQLÖеÄʱ¼äº¯Êý·Ç³£ÓÐÓã¬ÌرðÊÇÔÚÎÒÃǽøÐгõʼ¸³Öµ¡¢¸´ÔÓ²éѯµÄʱºò£¬¾ÍÏÔµÃÌر𷽱㡣
1¡¢»ñµÃϵͳµ±Ç°Ê±¼ä
select getdate() 
2¡¢DateName ( datepart , date )·µ»Ø±íʾָ¶¨ÈÕÆÚµÄÖ¸¶¨ÈÕÆÚ²¿·ÖµÄ×Ö·û´®¡£
--½ñÌìÊÇ2009-2-24--ÐÇÆÚ¶þ
SELECT DATENAME(year, getdate()) AS 'Year&nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ