Delete Vs Truncate

  • Jeff,

    I went through many of the questions you answered, i really like your explanations.

    Thanks for simplifying the words in layman terms.

    Sahasam..

  • nitu.guptaji (5/28/2010)


    mean at the time of deletion log file is maintened we can recover data but in the case of truncation we can not recover because it doesn't maintain log file

    Ummm... not quite true. You CAN rollback a truncation if it is part of an explicit transaction. It will also roll itself back if anything goes wrong. The rollback is simple on truncations... it just picks the book back up out of the trash can and sets it back on the shelf. That's what they meant by "deallocation of pages" before. It simply reallocates the markers for the pages... the data never went away.

    --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.

    Change is inevitable... Change for the better is not.


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

  • Sahasam (5/28/2010)


    Jeff,

    I went through many of the questions you answered, i really like your explanations.

    Thanks for simplifying the words in layman terms.

    Sahasam..

    Thanks, Sahasam.

    --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.

    Change is inevitable... Change for the better is not.


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

  • Perry Whittle (5/28/2010)


    Jeff Moden (5/27/2010)


    Just don't throw the book at me. 😛

    No give him a taste of his own medicine and throw a few pork chops instead 😀 :laugh:

    Especially if they're "smoked" pork chops... yuuummmm...

    --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.

    Change is inevitable... Change for the better is not.


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

Viewing 4 posts - 16 through 18 (of 18 total)

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