'Update MySQL table with values from another table

I have a MySQL database and I need to update table rows with values from another table. For example in one table there is a list of addresses which are stored for a specific customer. There is one address entry per customer and this address ID is stored in the Customers table in each customer entry under "address_id" column. I would like to know if it's possible to run a query which will update a list of addresses with the id's of the customers. So for each address row which id is found in customer row should have customer id in the specific column. Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source