Maybe it is not null but has empty content?

the first statement is correct

try
>>  SELECT * FROM questions WHERE (answer IS NOT NULL OR answer<>'');
or maybe
>>  SELECT * FROM questions WHERE LENGTH(answer)>0;




----- Original Message ----- 
From: "Pambos Nicolaou" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 7:11 AM
Subject: [PHP-DB] Selecting Null columns


Hi everyone

I am a new user of this mail list and I hope that it will be helpful.

I am trying to show the content of a MySQL table(raw) where the content of a
column is NOT NULL. I used the commands below but the result shows the
content of the whole table for the first case and nothing in the second
case.

>>  SELECT * FROM questions WHERE answer IS NOT NULL ;
>>  SELECT * FROM questions WHERE answer <> NULL ;

Thanks in advance

Nicolaou Pambos

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to