Results 1 to 5 of 5

Thread: Truncate and Drop table Statement are getting RollBack

  1. #1
    Geek_Guest
    Guest

    Truncate and Drop table Statement are getting RollBack

    Hi To all
    I want a clear answer
    Delete can be rolled back and Truncate Cant Rollback
    But Truncate getting Rollbacked
    Not only Truncate ......Drop table Statement also getting RollBack
    Try with this Sample Table and clarify my doubt
    ---------------------------------------------------------------
    create table I (i int)
    insert into I(i) values (1)
    go
    set nocount on
    select i 'BEforeTruncate' from I
    begin tran
    truncate table I/Drop table I
    select i 'afterTruncateBeforeRollback' from I
    rollback
    select i 'AfterTruncate' from I

    –results:
    BEforeTruncate
    ————–
    1

    afterTruncateBeforeRollback
    —————————

    AfterTruncate
    ————-
    1

    Note that after the rollback, the table again has the row


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Truncate and Drop table Statement are getting RollBack

    Are you talking of oracle my dear ???


  3. #3
    Contributing Member
    Join Date
    Apr 2006
    Answers
    46

    Re: Truncate and Drop table Statement are getting RollBack

    i can't understand what you want to write pls explain


  4. #4
    Junior Member
    Join Date
    May 2008
    Answers
    1

    Re: Truncate and Drop table Statement are getting RollBack

    if you are talking oracle, then there is no way you can ROLLBACK a truncate stt.
    Truncate is a DDL and it resets the HWM for the table.


  5. #5
    Junior Member
    Join Date
    Aug 2008
    Answers
    2

    Re: Truncate and Drop table Statement are getting RollBack

    it possible in SQL Server 2000 or 2005


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact