Autocommit in truncate table Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Autocommit in truncate table

  1. #1
    Join Date
    May 2002

    Question Autocommit in truncate table

    I gave the following statements in the sql prompt

    SQL > update tableA set columnA=’XXXXX’ ;

    SQL > truncate table tableB;

    SQL > rollback;

    I know that, tableB cannot be rollbacked. But I want to rollback the update statement given in the tableA. Due to the auto commit in the truncate statement, the first update statement also committed automatically.

    Can any one explain, why I am not able to rollback the first update statement? Is there is any oracle document saying that, all the transaction before the truncate statement are automatically committed?


  2. #2
    Join Date
    Sep 2002
    Yes its in the docs, truncate does an implicit commit, so any pending transactions will be commited
    Last edited by davey23uk; 11-18-2004 at 06:32 AM.

  3. #3
    Join Date
    Apr 2003
    luckily you tested.

    go through the docs on this basics and test them.
    (not on the live databases!!! too dangerous.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width