I have a GUID value that is retreived from a table1 that I am trying to insert into table2. Both the source and destination tables have the datatype uniqueidentifier. However, on an insert to table2, this column is being set to null. Can we copy guid columns from one table to another? Or is the issue something else.
declare @myGUIDsrc uniqueidentifier
select @myGUIDsrc = column1 from table1 <---- only one row and GUID value is returned
insert into table2 (column1, column2) values (@myGUIDsrc , 'TEST')