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

sql ±¯¾ç

http://topic.csdn.net/u/20091008/12/a2577eba-1b5b-4e1e-ab20-0a047bf3f8d7.html?4385
1Â¥
liangCK
SQL code:
update a set
ʱ¼ä = b.ʱ¼ä
from tb1 as a
join tb2 as b
on a.¿¨ºÅ= b.¿¨ºÅ
where not exists(select * from tb2
where ¿¨ºÅ=b.¿¨ºÅ and ʱ¼ä> b.ʱ¼ä)

3Â¥
liangCK
SQL code:
update a set
ʱ¼ä = b.ʱ¼ä
from @tb1 as a
join @tb2 as b
on a.¿¨ºÅ= b.¿¨ºÅ
where not exists(select * from @tb2
where ¿¨ºÅ=b.¿¨ºÅ and ʱ¼ä< b.ʱ¼ä)



µ±Ê±ÎÒûÓп´µ½3Â¥µÄÕý½â£¬ÓÚÊǾͷ¢ÁËÒ»¸öÌû×Ó
http://topic.csdn.net/u/20091008/13/490b3e82-3e4c-4e7d-a5a1-a2632e355bd8.html?32712

¿´À´ wufeng4552  xuejie09242  navy887
¶¼Ã»Óп´µ½ Ìû×ÓÖеĴíÎó°¡



  b          ÄÚ±í
1  2007    1  2007
1  2008    1  2008
1  2004    1  2004

2007  = <all  N
2008  = <all  n
2004  = <all  n

Ó¦¸ÃÊǰѱÈ×îСµÄ¶¼Åųýµô 
±ÈÈç 
2007>(2007 2008 2004)  y
2008>(2007 2008 2004) 


Ïà¹ØÎÊ´ð£º

sql ʱ¼äÎÊÌâ

sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001

ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......

ÇóSQL£¿

´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e 
ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......

Õâ¸öSQL¸ÃÈçºÎд

дSQLÓï¾ä£º
±í1£ºCLASS
º¬ÓÐÁ½¸ö×ֶΣºID£¬CLASSNAME,±í½á¹¹ÈçÏ£º
ID CLASSNAME
1    A
2    B
3    C
4    D
±í2£ºSTUDENT
º¬ÓÐÈçÏÂ×ֶΣºS ......

ÇóSQLÓï¾ä

ÏÖÔÚÓÐÁ½Õűí
a±íºÍb±í

a±í:
¹¤ºÅ  ÐÕÃû  ËùÊô²¿ÃűàºÅ
001              A
002              B
003&n ......

SQL serverÊý¾Ý¼¯³ö´íÇóÖú

Á½ÖÖ´íÎó£º
1.Èç¹ûÎÒÕâÑùÉêÃ÷£ºResultSet rs;´íÎóÌáʾÈçÏ£º

An error occurred at line: 51 in the jsp file: /index.jsp
The local variable rs may not have been initialized
48:    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ