Yes, make sure your table is designed to allow NULL values in the corresponding column. See the basic example below:
DROP TABLE IF EXISTS testTable; CREATE TABLE `testTable` ( `id` int(11) unsigned NOT NULL auto_increment, `data` int(11) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; INSERT INTO testTable VALUES (NULL, 100), (NULL, 200), (NULL, NULL), (NULL, 400); SELECT * FROM testTable;
The selection will have the following result:
+----+------+ | id | data | +----+------+ | 1 | 100 | | 2 | 200 | | 3 | NULL | | 4 | 400 | +----+------+
StudyOfCrying
source share