How to a Query to copy data from on table to another table.

Answer Posted / mohamed ibrahim

To Copy the data from one table to another table
for ex . i have the table named as TempMaster that having
the fields ID ,Name .The having the following record
ID Name
1 Raja
2 Mohamed

I want the same record copy to TempMasterArcheived table

to copy this using the following code:
INSERT INTO TempMasterArcheived
EXECUTE
('SELECT * FROM TempMaster ')

ID Name
1 Raja
2 Mohamed

after the output of TempMasterArcheived is as follows

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of subquery?

931


How do I determine how many instances of sql server are installed on a computer?

752


What are the different types of lock modes in sql server 2000?

656


What are indexes in ms sql server?

741


Explain differences between web edition and business edition?

115


What is difference between sql and sql server?

710


Is the order of columns in the set clause important in ms sql server?

735


What is a derived table?

715


What is report server project?

122


what is a schema in sql server 2005? : Sql server database administration

724


Tell me what is a linked server?

787


What is the need for group functions in sql?

775


Why use sub query in sql server and list out types of sub queries?

744


What are the differences in Clustering in SQL Server 2005 and 2008 or 2008 R2?

787


What are the different subsets of sql?

1215