oracle - what statements need to be committed?

后端 未结 4 1246
渐次进展
渐次进展 2020-12-12 18:04

What are the list of statements that need to be committed before further action on the table in order to avoid a lock? I am not talking about full transactions with multiple

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-12 18:43

    DML have to be committed or rollbacked. DDL cannot.

    http://www.orafaq.com/faq/what_are_the_difference_between_ddl_dml_and_dcl_commands

    You can switch auto-commit on and that's again only for DML. DDL are never part of transactions and therefore there is nothing like an explicit commit/rollback.

    truncate is DDL and therefore commited implicitly.

    Edit
    I've to say sorry. Like @DCookie and @APC stated in the comments there exist sth like implicit commits for DDL. See here for a question about that on Ask Tom. This is in contrast to what I've learned and I am still a bit curious about.

提交回复
热议问题