user3169288
user3169288

Reputation: 21

Temporary tables in sp

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

Answers (1)

Tobberoth
Tobberoth

Reputation: 9537

Assuming the table structure is identical, this should work fine:

INSERT INTO RealTable
SELECT * FROM #TemporaryTable

Upvotes: 1

Related Questions