During consumption, an append query is used:
Insert into xfxxjl (xfxxjl_id, struct, xfxxjl_zd, xfxxjl_spbm, xfxxjl_spmc, xfxxjl_dj, merge, merge, xfxxjl_sl, xfxxjl_je)
SELECT temp_id, temp_yh_id, temp_zd, temp_spbm, temp_spmc, temp_dj, temp_zk, temp_zhdj, temp_sl, temp_je
FROM temp;
An error occurred suddenly today when I used it well (SEE ):
The number of items found on the Internet is not small, some are that the field is set to allow null values, and some are that the primary key conflicts, and so on. But I checked it carefully. Both of the two reasons are ruled out.
Why? Later, I suddenly thought that when I used the data clearing function by time period a few days ago, because the table XFXXJL does not have the designed consumption time and only consumes records (xfjl) this table records the consumption time. Later, for the convenience of deletion, I set the two tables as master slave tables, and the relationship is "cascade related records ".
The reason is finally found. It is impossible to update the slave table without updating the master table.