locked
What is the best function to use when moving data from one table to another? RRS feed

  • Question

  • What is the best function to use when I have data in one table that I want in another table?

    The ones I have come across so far are Insert into and bulk insert. Which one is best?

    Monday, August 8, 2011 3:26 PM

Answers

All replies

  • If you are moving relatively less amount of data ( 1 to 1 lakh rows ) and that too on the same server... It is better to go with the insert statement...

    If you want to transfer relatively large amount of data (more than 1 lakh) and that too on some other servers.... it is better to go with bulk insert....

     

    as a thumb rule use insert incase if it is the same server and relatively less amount of data....


    Nothing is Permanent... even Knowledge....
    My Blog
    • Proposed as answer by sambeet Monday, August 8, 2011 5:25 PM
    • Unproposed as answer by Kalman Toth Monday, August 15, 2011 5:36 AM
    Monday, August 8, 2011 3:29 PM
  • What is the best function to use when I have data in one table that I want in another table?

    The ones I have come across so far are Insert into and bulk insert. Which one is best?


    In addition to the above, for large amount of data consider the SSIS Import/Export Wizard:

    http://www.sqlusa.com/bestpractices2008/administration/ssiswizardicon/

     


    Kalman Toth, SQL Server & Business Intelligence Training; sqlusa.com
    Monday, August 15, 2011 5:36 AM
  • If you are moving relatively less amount of data ( 1 to 1 lakh rows ) and that too on the same server... It is better to go with the insert statement...

     

    To All:

    Use American English at this forum.

     


    Kalman Toth, SQL Server & Business Intelligence Training; sqlusa.com
    Monday, August 15, 2011 5:37 AM
  • Yep if it is huge amount of data I would use SSIS with OLEDB provider which has fast load feature
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, August 15, 2011 5:58 AM
    Answerer