表A和表B,现在希望更新A表,当 A.bid = B.id时,a.x = b.x, a.y=b.y,请问mysql中sql语句如何写,谢谢
update tb_common_verification_tk set '新字段'='旧字段'。
例如:
A表
id name credits
1 aa 11
2 aa 222
3 bb 11
4 bb 222
b表
id name credits
1 aa 222
2 bb 222
操作的是a表,能不能有什么办法让B表中的credits值一直为a表中的credits最大值。