Q:

Most efficient way of transferring large amounts of data from one column to another?

I currently have two tables, and one has a dependency on the other that I want to remove.
Let's say the tables are Product and Employee, and there are about 800,000 rows in each table.
The Employee table has a ProductID, in which there is a ProductRefID, which I need to reference in my application. The way this is done is to join in the Product table, and reference the ProductRefID that way.
However, I now want to change this so that ProductRefID is a column on the Employee table, and then transfer every Product row's "ProductRefID" to the Employee row's "ProductRefID".
What would be the most efficient way of writing this query?
(I know it sounds stupid, but it's just an example, it's not actually what I'm trying to do specifically).

A:

Something like this ?
alter table Employee add ProductRefID INT

update e
set ProductRefID = p.ProductRefID
from Employee e
join 
Product p
on e.ProductID = p.id

