Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Fastest way to copy table in SQLServer 2000

Fastest way to copy table in SQLServer 2000

Scheduled Pinned Locked Moved Database
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mikker_123
    wrote on last edited by
    #1

    Let's presume I have Table1 and Table2 already created and with same strucuture. Table1 has all data. So is this fastest way to copy data: INSERT INTO Table2 SELECT * FROM Table1 ? Tnx

    A A 2 Replies Last reply
    0
    • M mikker_123

      Let's presume I have Table1 and Table2 already created and with same strucuture. Table1 has all data. So is this fastest way to copy data: INSERT INTO Table2 SELECT * FROM Table1 ? Tnx

      A Offline
      A Offline
      Alomgir Miah
      wrote on last edited by
      #2

      I think this is the fastest. You can try comparing the performance with SELECT * INTO Table2 FROM Table1 Live Life King Size Alomgir Miah

      1 Reply Last reply
      0
      • M mikker_123

        Let's presume I have Table1 and Table2 already created and with same strucuture. Table1 has all data. So is this fastest way to copy data: INSERT INTO Table2 SELECT * FROM Table1 ? Tnx

        A Offline
        A Offline
        Andy Brummer
        wrote on last edited by
        #3

        If they are in the same database this should be the fastest or close to it. If you have the transaction log configured to not log it, then using SELECT * INTO Table2 will create table2 and won't be logged which is faster.


        I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups