A(id,username),B(userid,name)
如果需要更新A.id为,条件是A那条数据的username等于B.name时的B.userid
update A set A.id=B.userid from A,B where A.username=B.name
A(id,username),B(userid,name)
如果需要更新A.id为,条件是A那条数据的username等于B.name时的B.userid
update A set A.id=B.userid from A,B where A.username=B.name