Conclusion: When using not in, you should pay attention to whether there is a null value in the field, because the null value row will be filtered out when using it
When not in is used, it will filter the field to be null value row
in will not count rows with null values, and will not be affected by null values
Reason: null value is fasle when compared with any value
Note: In addition to not in, "!=", "not like", etc. will also have this problem
Example:
1. To give a small example, the full amount of data is shown in the figure below.
SELECT * from temp;
2. If you want to filter out the data with score=70, you can write it in the following way, and the row whose score is null in the result will be filtered out.
SELECT * from temp where score not in (70);