Posted By: znouza (- Armored Pilsener -) on 'CZdatabases'
Title: Re: SQL Server a NULL datum
Date: Wed Jun 21 19:24:19 2000
>
> No, s tim OR is null - znouza mi radil isnull([date], '18990101') <>
> logfiledate, coz taky funguje :) jinak je to na M$ SQL Serveru 7 ... jinak
> ja
> pouziju tu kontrolu na null, ale zajimalo by me, proc to je tak jak je, ze
> null se rovna jakymukoli datumu ... je to moje prvni vec v SQL a trosku me
> to
> odrazuje ... z C++ sem zvyklej ze pokud nejsou stejny tak proste nejsou :)
>
>
> Jerry III
>
> Enough said ...
> http://jerryiii.home.sprynet.com/mica/index.htm
A value of NULL indicates the value is unknown. A value of NULL is different
from an empty or zero value. No two null values are equal. Comparisons
between two null values, or between a NULL and any other value, return
unknown because the value of each NULL is unknown.
Care must be taken when comparing null values. The behavior of the comparison
depends on the setting of the SET ANSI_NULLS option.
When SET ANSI_NULLS is ON, a comparison in which one or more of the
expressions is NULL does not yield either TRUE or FALSE; it yields UNKNOWN.
This is because a value that is unknown cannot be compared logically against
any other value. This occurs if either an expression is compared to the
literal NULL, or if two expressions are compared and one of them evaluates to
NULL.
z Online Books k M$ ZQL.
_ _ /-------- znouza
( o)(o ) /__________
|| | |
|| |_| "The game of life is hard to play..."
** __| 3T