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 is index fragmentation in ms sql server?

590


What is a with(nolock)?

568


What is a system database and what is a user database?

571


How to download and install microsoft sql server management studio express?

556


Explain the difference between primary keys and foreign keys?

505






What is reference section?

491


What is deploy, process and build? : sql server analysis services, ssas

560


What is clustered vs nonclustered index?

504


What is the parse query button used for?

598


Explain the third normal form(3nf)?

518


Comment,Datatypes are unlimited

1621


What is shared lock?

481


what are user defined datatypes and when you should go for them? : Sql server database administration

530


Can binary strings be used in arithmetical operations?

518


create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

495