How to copy a huge table data into another table in SQL Server

前端 未结 8 1257
慢半拍i
慢半拍i 2020-12-02 10:30

I have a table with 3.4 million rows. I want to copy this whole data into another table.

I am performing this task using the below query:

select * 
i         


        
相关标签:
8条回答
  • 2020-12-02 11:16

    select * into new_items from productDB.dbo.items

    That pretty much is it. THis is the most efficient way to do it.

    0 讨论(0)
  • 2020-12-02 11:23

    Simple Insert/Select sp's work great until the row count exceeds 1 mil. I've watched tempdb file explode trying to insert/select 20 mil + rows. The simplest solution is SSIS setting the batch row size buffer to 5000 and commit size buffer to 1000.

    0 讨论(0)
提交回复
热议问题