Updated on 2022-02-22 GMT+08:00

REPLACE

REPLACE is used to insert rows into or replace rows in a table.

Common Syntax

replace into table(col1,col2,col3)
values(value1,value2,value3)

Syntax Restrictions

  • PARTITION syntax is not supported.
  • If an auto-increment table has no ID, you can insert a data record with a specified ID using REPLACE, but no ID is generated.