sqlitestudio
sqlitestudio copied to clipboard
Select empty data when filtering condition `IS NULL`
Details
The SQL:
"SELECT * FROM table
WHERE table
.field
IS NULL;"
query returns empty data!
Operating system
Manjaro Linux
SQLiteStudio version
V3.4.4
Cannot reproduce with:
CREATE TABLE ttt1 (id INTEGER PRIMARY KEY, field TEXT);
INSERT INTO ttt1 (field) VALUES ('1'), (NULL), ('3');
SELECT * FROM ttt1 WHERE ttt1.field IS NULL;
Don't mistake NULL
with empty string value. These are 2 different values and should be filtered differently.
Perhaps your filter should be:
SELECT * FROM table WHERE table.field IS NULL OR table.field = '';