Reputation: 21
I just joined an IT company. I have been seeing that development team have been using Temp tables in procedures. I know what are temp tables. Can anyone just give me one small example showing the data moving from temp table to actual table(For insert) in the end of procedure.
Upvotes: 0
Views: 47
Reputation: 9537
Assuming the table structure is identical, this should work fine:
INSERT INTO RealTable
SELECT * FROM #TemporaryTable
Upvotes: 1