Replace into is very similar to insert into. The only difference is that when replace into is used, the system first checks whether there is a record that is the same as the statement to replace into Based on the table's primary key, if yes, delete the old record and insert a new record. In addition, after the replace into statement is executed, a value is returned. If it is set to 1, a data entry is inserted during execution. If it is set to 2, the old record is deleted and a new record is inserted. Although replace into does not cause any serious problems during normal use. If the table we want to operate on has an auto-increment primary key, a problem arises. First, because the new record and the old record have different primary key values, all the associations established with the old data primary key id in other tables will be damaged. Second, frequent replace into causes the primary key value of the new record to increase rapidly. One day. When the maximum value is reached, the data overflows because of the large amount of data. There is no way to insert new records. The data table is full, not because the space is insufficient, but because the value of the primary key cannot be increased. Author uohzoaix