Difference between empty ENUM value
The review_type parameter value for all my files is empty (but not null)
review_type is defined as follows ENUM('','a','m','f')
All 1108 records look like this
But 1000 records are not returned when searching for records with an empty review_type element. And when I search for posts without an empty review type, I get 0. What about those 1000 posts? How is this possible?
SELECT id, review_type FROM stuff; -- 1108 records
SELECT id, review_type FROM stuff WHERE review_type=''; -- 108 records
SELECT id, review_type FROM stuff WHERE review_type!=''; -- 0 records
-- column type is defined as NOT NULL, but just to be sure:
SELECT id, review_type FROM stuff WHERE review_type IS NULL; -- 0 records
+3
source to share