Regarding the situation where the number of update statement responses in sql is 0

Introduction: Usually when we are doing development, we often use update to update one or more pieces of data. But an important rule of the update statement is ignored.

There are only two situations where the number of Update statement responses is 0:

1. The data is not updated.

For example: update table_1 set col_1 ='zhai' where id ='fengxi'
There is no id ='fengxi' data in table_1, so the number of responses is 0.

2. The updated data is the same as the original data.

For example: (same as above sql) update table_1 set col_1 ='zhai' where id ='fengxi'
table_1 has the data id ='fengxi' in the table, and the col_1 column of the data corresponds to the value'zhai', then respond The data is 0.

Guess you like

Origin blog.csdn.net/u010318957/article/details/64441115