update VIEWRESIDENTHIST a,VISIT b set a.deathStatus=b.deathStatus where a.sourceTable=b.sourceTable and a.sourceId = b.sourceId
MYSQL更新一张表中的某个字段的数据,需要的数据从另外一张表拿
于 2023-09-14 14:31:40 首次发布
这篇文章描述了如何使用SQL语句updateVIEWRESIDENTHIST,通过设置a.sourceTable和a.sourceId等于b.sourceTable和b.sourceId,来更新visits表中deathStatus字段的内容。
摘要由CSDN通过智能技术生成