I have a column on my table called RecordId
. I want to duplicate this column to a column named BookId
. I know I can add column like this:
ALTER TABLE products ADD COLUMN BookId;
But how do I populate the value from the other column?
UPDATE products
SET BookId = RecordId
WHERE RecordId > 0