Skip to content

The same transaction includes both a truncate and an insert #64722

@gaoxianzhu

Description

@gaoxianzhu

I want to combine the operations of clearing table data and inserting data into the same transaction. In many data cleaning scenarios, we first clear the data and then insert new data. If these operations cannot be combined into the same transaction, data may be lost.
alter table tablea truncate partition p20251029;
insert into tablea select * from tableb;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions