How to update a single column of a table of data from a backup


All the data in a column of a table of members have been erased, but I made a backup of the table a few weeks ago.

So I need to replace only the data in this column by the old column in the backup of my table.

The problem is that I do not know how I should proceed to do so.

Have you been confronted by this problem and can you explain it to me.


UPDATE goodtable, backuptable
SET goodtable.somecolumn = backuptable.somecolumn
WHERE goodtable.primarykey = backuptable.primarykey

the somecolumn of course being the name of the column you wanted updated. the primary key being one or more columns in order to identify the rows correctly.