有两张桌子
一个ENO |价值|年月日 1 | 3 | 190308 1 | 10 | 190309 1 | 5 | 190310
乙ENO |目标| 1 | 10 |我们想要将表B的TARGET列更新为…
你可以尝试下面 -
update tableB A join (select * from tableA x where ymd in (select max(ymd) from tableA x1 where x.eno=x1.eno) )B on A.eno=B.eno set A.target=B.target