Subject | Re: [firebird-support] how NULL compares |
---|---|
Author | Ivan Prenosil |
Post date | 2005-09-01T16:08:03Z |
> I have a table likeNo, you have to test for nulls explicitely
>
> ID INTEGER
> TIMEIN TIME
> TIMEOUT TIME
>
> populates with records like
> 1 Time1 <Null>
> 2 <Null> Time2
> 3 Time3 <Null>
> 4 <Null> Time4 etc.
>
> If i use
>
> SELECT *
> WHERE (TIMEIN > Param1) AND (TIMEIN < Param2) AND (TIMEOUT > Param1)
> AND (TIMEOUT < Param2)
>
> will it return the right records and NULL is not being compared here?
WHERE (TIMEIN > Param1 OR Param1 IS NULL) AND ...
Ivan