84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
两个表分别都有两个相同的字段比如A表有cityId,cityName.B表也有cityId,cityName. B表的cityId和cityName都有值。A表有大量数据cityId有值且值都包含在A表。cityName为空。如何去根据B表填充A表的cityName?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
update A join B set A.cityName=B.cityName on A.cityId=B.cityId
sqlUPDATE a, b SET a.cityName = b.cityName WHERE a.cityId= b.cityId
sql
UPDATE a, b SET a.cityName = b.cityName WHERE a.cityId= b.cityId
update A join B set A.cityName=B.cityName on A.cityId=B.cityId