Maak je thread_title
is
varchar(255) and Default value is NULL
en gebruik uw vraag
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
UITVOER
THREAD_TITLE
foo
bar
HIER IS DE WERKENDE SQL-FIDDLE