How to copy the content of one temp table into another ?

Suppose in Sql server I have two temporary tables,@temp_table_One, and @temp_table_Two

What I need to do is to copy the contents of temp_table_One into temp_table_Two. How would I do this using Sql? (Assume no data exists in temp_table_Two)


Declare @temp_table_One
(
 id int,
 name varchar(30) null,
 address varchar(150)
)

Declare @temp_table_Two
(
 id int,
 name varchar(30) null,
 address varchar(150)
)
LVL 2
brgdotnetcontractorAsked:
Who is Participating?
 
PortletPaulConnect With a Mentor freelancerCommented:
select id, name, address
from @temp_table_One
into @temp_table_Two
0
 
PortletPaulConnect With a Mentor freelancerCommented:
you might want to read this:

INTO Clause (Transact-SQL)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.