Assicurati che il tuo thread_title sia
varchar(255) and Default value is NULL e usa la tua query
CREATE TABLE IF NOT EXISTS `forumposts` ( `thread_title` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `forumposts` (`thread_title`) VALUES ('foo'), ('bar'), (NULL); SELECT thread_title FROM forumposts WHERE thread_title IS NOT NULL OUTPUT
THREAD_TITLE foo bar