No reason to store T-SQL insert IDs in a table variable and then select them - just output directly