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
Explain how to maintain a fill factor in existing indexes?
Tell me about the approaches which you used to counter the DI problems.
how you can list all the tables in a database?
How to use values from other tables in update statements in ms sql server?
what are constraints? : Sql server database administration
Explain datetimeoffset data type in sal server 2008?
How to populate a table in sql server?
What is coalesce and check constraint in sql server?
What is Dependency Injection and provide example?
When would you use a before or after trigger?
What is join query?
What are sparse columns?
how to avoid cursors? : Sql server database administration
Can you change the data type of a column in a table after the table has been created? If so, which command would you use?
Should you normalize audio?