At 10:17 AM +1000 7/26/01, Alan Tse wrote:
>I have a date field, how do I check if it is null or
>empty in sql statement.
>
>I tried :
>select *
>
>where fDate = NULL;
Wrong test. NULL is special. Use:
where fDATE IS NULL
>
>and also tried
>where fDate = '';
>
>Both return nothing but act
maybe below info answer your question.
--- copy from mySQL Reference Manual for version 3.23.22-beta, section
7.3.6.2 The DATETIME, DATE and TIMESTAMP types ---
Illegal DATETIME, DATE or TIMESTAMP values are converted to the ``zero''
value of the appropriate type ('-00-00 00:00:00', '-00