I was supposed to copy data from one database to another. I used INSERT INTO db1.dbo.tbl1 a SELECT * FROM db2.dbo.tbl2 b WHERE a.id = b.id. This statement works fine.
Suppose that tbl1 and tbl2 are two identical tables. My problem is, I need to insert the same data to the destination table (tbl1) but this time with a different new id. The data is still coming from the source table (tbl2). How would I do this? Do I still have to use that INSERT INTO SELECT statement? And how would I include that NEW ID to the destination table?