I have a database with account numbers and card numbers. I match these to a file to update any card numbers to the account number, so
account numbers
card numbers
update
In case the tables are in a different databases. (MSSQL)
update database1..Ciudad set CiudadDistrito=c2.CiudadDistrito FROM database1..Ciudad c1 inner join database2..Ciudad c2 on c2.CiudadID=c1.CiudadID