SQL Server create a row in Table B for every row in Table A and put the ID in Table A
- by ScottyDoesKnow
I know how to create a row in Table B for every row in Table A:
INSERT INTO [dbo].[TableB] SELECT 0, 5, 3, [TableAColumn] FROM [dbo].[TableA]
But I need to also put the ID of each new TableB row into a column in TableA, and I can't figure out how to do that.