HW TO COPY THE DATA OF ONE TABLE TO ANOTHER TABLE IN SQL SER
QUERY WITH DETAILS EXAMPLE
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Palle TechnologiesRank #6,639 · 260 reputationPosted Jan 25, 2014, 5:00 AM EST
insert into t1 values (1,'lok')
insert into t1 values (2,'rajeev')
--now copy the above tables data into another table.
case1: when destination table is not existing use below query
select * into newtablename from t1
case2: assume you have another table with same structure as t1 table and assume its name as t2. then use below query
insert into t2 select * from t1
hope this helps.
Vithal WadjeRank #19 · 47.2K reputationPosted Jan 25, 2014, 8:20 AM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 1, 2014, 11:57 PM EDT
hi,
Please refer
http://www.c-sharpcorner.com/UploadFile/1e050f/copy-table-schema-and-data-from-one-database-to-another-data/
http://www.c-sharpcorner.com/Blogs/11499/insert-data-from-one-table-to-another-table-in-sql-server.aspx
http://www.c-sharpcorner.com/UploadFile/rohatash/copy-table-with-data-from-one-database-to-another-in-sql-ser/
JAYRAMRank #7,836 · 233 reputationPosted Apr 5, 2014, 3:40 AM EDT
select * from table1