Moving a Table

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 715053

    Comments posted to this topic are about the item Moving a Table

  • Jeff Moden

    SSC Guru

    Points: 994238

    I've never had to do such a thing before and so I have to admit that I had to look this one up.ย  Learned something new.ย  Thanks for the great question, Steve.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. ๐Ÿ˜‰

    Helpful Links:
    How to post code problems
    Create a Tally Function (fnTally)

  • tsalha

    SSC Rookie

    Points: 26

    it is especially useful, if you need a table to be online all the time, but want to load lots of data to it (e.g. full reload). Then you can create it in a, say 'temp' schema. When finished, just swap the tables using the aforementioned command ๐Ÿ˜€

  • Jeff Moden

    SSC Guru

    Points: 994238

    tsalha wrote:

    it is especially useful, if you need a table to be online all the time, but want to load lots of data to it (e.g. full reload). Then you can create it in a, say 'temp' schema. When finished, just swap the tables using the aforementioned command ๐Ÿ˜€

    That would work as a "3 name" swap.ย  Not sure how you'd do it with only 2 names.ย  Repointing a synonym is seems easier.

    Of course, I could be wrong and would love to see a coded example of how you do it.ย  Even an old dog like me still likes learning different tricks.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. ๐Ÿ˜‰

    Helpful Links:
    How to post code problems
    Create a Tally Function (fnTally)

  • Stewart "Arturius" Campbell

    SSC Guru

    Points: 71310

    Nice question, thanks Steve

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    โ€œlibera tute vulgaris exโ€

  • sendijunk

    Mr or Mrs. 500

    Points: 527

    Why does the link point to the Brazilian documentation?

  • Marcia J

    SSCertifiable

    Points: 5562

    To see if anyone is paying attention.

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 715053

    No idea why Brazil came up for docs. I was sure I copy/pasted the US-EN version. It's been corrected.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply