把某字段的某一个值设置成该字段中最大值,应该怎么写? 用2条语句;或者这样44:update testtable a set a.fid=(select max(b.fid) from testtable b) where a.fid=2; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 谢谢,但是update test a set a.msgid=(select max(b.msgid) from test b) where a.msgid=2;这样也不行。 update testtable, (SELECT MAX(fid) AS MAX_ID from testtable) AS A SET testtable.FID=A.MAX_ID Where testtable.fid=2; mysql怎么在线备份数据库和在线恢复数据库 php mysql连不上 mysql插入不重复的数值,怎么写? sql column_type指的是什么意思? 数据导出的问题 错误:Got error 127 from storage engine mysql有几个版本,有什么区别,mysql有中文版么,mysql适合安装在windowsXP上么? 如何在Windows上运行多个MySql服务器? 请教slave机器不执行binlog语句 mysql update 报错 中文问题!急 mysql中的使用 in遇到的问题
update test a set a.msgid=(select max(b.msgid) from test b) where a.msgid=2;
这样也不行。
SET testtable.FID=A.MAX_ID Where testtable.fid=2;