Skip to Main Content

Breadcrumb

XMAS_TREE

The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.

Question and Answer

Connor McDonald

Thanks for the question.

Asked: February 12, 2016 - 8:42 am UTC

Last updated: February 12, 2016 - 10:51 am UTC

Version: 10.0

Viewed 1000+ times

You Asked

--->We have one table in the 10 records there ,then update the salary column and insert one new record and
alter the new column.Then rollback keywords command use .Then what is the output ? How many rows are
retrieved.


and Connor said...

If you did an "alter table" you have done a commit.

All Oracle DDL does a commit before AND after the ddl is executed (so even the DDL fails, you have still done commit).

So if you

- started with 10
- updated 1
- added 1
- did "alter table add column"
- rollback

You will 11 rows *and* still have the new column

We're not taking comments currently, so please try again later if you want to add a comment.