update Users set Users.name = Users2.name
from Users2 left join Users
on Users2.id = Users.id
where Users.name != Users2.name
--链表DEl
delete Users from Users left join Users2 on Users.id=Users2.id where Users.id=1 --删users表
DELETE Users,userrolegroups FROM Users LEFT JOIN Users22 ON Users.id=Users2.id WHERE Users.id=1 --同时删2张表(Users,userrolegroups)