根据主键,把一个表的字段赋值到另一张表
需求:根据userId 把user表的 username 和phone字段填充到score表中 update score,user set score.username = user.username , score.phone = user.phone where score.userId = user.userId
或者update score join user on score.userId=user.userId set score.username = user.username , score.phone = user.phone
原创文章,作者:506227337,如若转载,请注明出处:https://blog.ytso.com/277157.html