Replace Into Query Syntax

前端 未结 3 638
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 01:31

I want to be able to update a table of the same schema using a \"replace into\" statement. In the end, I need to be able to update a large table with values that may have c

3条回答
  •  甜味超标
    2020-11-30 02:24

    As the documentation says:

    REPLACE works exactly like INSERT, except that if an old row in the table has the same value as a new row for a PRIMARY KEY or a UNIQUE index, the old row is deleted before the new row is inserted.

提交回复
热议问题