开发者

SQL Synchronising large table data

开发者 https://www.devze.com 2023-03-07 13:02 出处:网络
Hi i m using SQL 2008 R2.What is the faster w开发者_StackOverflow社区ay to insert data of 10 mil. records from one table A into another empty table B.

Hi i m using SQL 2008 R2.What is the faster w开发者_StackOverflow社区ay to insert data of 10 mil. records from one table A into another empty table B. Table A and B dont have same schema similar but not the same.


It's only 10 million rows. Just use a normal INSERT

INSERT tableB (col1, col2, col3, ...)
SELECT col1, col2, col3, ... FROM tableA

or

--assumes no table b already
SELECT col1, col2, col3, ..., INTO TableB FROM tableA
.. now add some columns etc


Your using sql?

why not create a new table and then insert records from table a into new table b??

0

精彩评论

暂无评论...
验证码 换一张
取 消