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

mysqlµÄ¸üÐÂÓï¾ä - Java / Java SE

id name datetime
1 a 2010-05-13 10:15:00
2 b 2010-05-14 09:10:00
3 d 2010-05-14 10:10:00

ÈçºÎ½«¾àÀëÄ¿Ç°×î½üµÄÄǸö¼Ç¼µÄname ¸üÐÂΪ¡°x¡±ÄØ

лл¿© °¡ ºÇºÇ
update table_name set name='x' where datetime in (select max(datetime) as datetime from table_name)

ÒýÓÃ
update table_name set name='x' where datetime in (select max(datetime) as datetime from table_name)


up£¡£¡£¡£¡

¶Ô Ó¦¸Ã¾ÍÕâÑùµÄ ²»¹ýÈç¹ûÊý¾ÝÁ¿´óµÄ»°¿ÉÒÔÓÃexists
update table_name a set name='x' where exists (
 select 1 from (
  select max(datetime) from table_name
 ) b where b.datetime=a.datetime
);


update tble set name='x' where not exists (select 1 from tbl b where b.ttime<tble.ttime);

ÒýÓÃ
update table_name set name='x' where datetime in (select max(datetime) as datetime from table_name)



ºÃÏñ²»ÐÐŶ  

³öÏÖÕâÑùµÄ´íÎóŶ #1093 - You can't specify target table 'te_log' for update in from clause

MYSQLÊý¾Ý¿â²»Ö§³Ö°É¡£
´íÎóÌáʾ¾ÍÊÇ˵£¬²»ÄÜÏÈselect³öͬһ±íÖеÄijЩֵ£¬ÔÙupdateÕâ¸ö±í(ÔÚͬһÓï¾äÖÐ) 

˼·£¬create table_name as select max(datetime) as datetime from table_name
È»ºóupdate table_name set name='x' where datetime in ÉÏÃæÄǸö±í;
È»ºódropÄǸö±íÊÔÊÔ

ÊÔÁËһϲ»Ö§³Ö£¬×Ö²éѯÓÃÁÙ


Ïà¹ØÎÊ´ð£º

JSP/Servlet½»»¥ - Java / Web ¿ª·¢

JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
  JSPÒ³Ã潫²ÎÊýPOST¸øservlet
  
  ÒªÇóÈçÏÂ;
  1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......

JAVAµç×Ӵʵ䣿 - Java / Java SE

¸÷·´óÏÀ¸ø¸ö˼·£¬²»ÊÇÔÚÏßµÄÄÇÖÖ£¬¾ÍÊÇÒ»¸ö×öÆÕͨµÄÓ¦ÓóÌÐò¡£


´Ê¿âÔõôÉú³ÉÄØ£¿

²»»á¡£

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
ÕÒ±¾×Öµä

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
Êý¾Ý¿â ºÇºÇ

ÓÃmap ¼üÖµ¶ÔÓ¦

Èç¹ûÓÃÊý¾Ý¿ ......

FCKÉÏ´«Îļþµ½linux·þÎñÆ÷ÎÊÌâ - Java / Java EE

ÇëÎÒÓÃFCKÉÏ´«Îļþ,ÔÚ±¾µØµÄwindows»úÉϲâÊÔ¿ÉÒÔ£¬µ«²¿Êðµ½linux·þÎñÆ÷ÉϾÍÉÏ´«²»ÁËÎļþ£¬ÉÏ´«Îļþʱһֱ¿¨ÔÚÄÇÀï¡£Íû¸÷λ´óϺָµã£¬Ð»Ð»£¡
·¹ý£¬°ïÄ㶥һÏ¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£

ÉÏ´«ÎļþµÄ·¾¶ÎÊÌ⣬ ......

tomcat»·¾³ÏÂjsp±àÒë´íÎó£¬Çó½â£¡ - Java / Web ¿ª·¢

org.apache.jasper.JasperException: Unable to compile class for JSP: 
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ