Copy Table and KEEP the Original UNIQUEIDENTIFIER values

Hi experts,
I need to copy a table that has 2 columns defined as uniqueidentifier. I need to keep the same values in the destination table, which has the same 2 columns defined the same way.

How can I preserve/keep the values in my destination table?
Thanks!

Just do the copy (Insert/Select, I presume is what you're doing). UNIQUEIDENTIFIER columns aren't like an IDENTITY column.

1 Like

Well, that's the best news I've had all week. I thought I remembered this being an issue. Thanks Jeff.
(Yes I'm doing Insert/Select)

As Jeff said, don't let them default (presumably to NEWID()). Instead, explicitly copy the existing columns from the first table to the second. Unless you have some trigger on the second table, that should work.