The REPLACE INTO
function in MySQL works in such a way that it deletes and inserts the row. In my table, the primary key (id
) is auto-incremented, so I was expecting it to delete and then insert a table with id
at the tail of the database.
However, it does the unexpected and inserts it with the same id
! Is this the expected behaviour, or am I missing something here? (I am not setting the id
when calling the REPLACE INTO
statement)