由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - in DBMS, is NULL=NULL valid?
相关主题
[转载] Can anyone interpret this simple SQL?Problem when using SQL " Insert...." to AutoNumber.
问一个SQL Server的问题Help needed in SQL
帮忙解释下这个查询,有关NULL的今典问题: 这个Self Query咋写?
紧急求助, 关于SQL ServerAccess门外汉问题求教
COMBINE RECORDS请教一个有关SQL concat的问题
correlated subqueryMerge table with one single query?
About INSERT IGNORESQL Conditional Select
DW BI ETL 问题 - Data Validation and Recordset Comparison (转载)MS T-SQL 问题
相关话题的讨论汇总
话题: null话题: value话题: dbms话题: unknown话题: false
进入Database版参与讨论
1 (共1页)
s**********r
发帖数: 565
1
why? thanks
f***g
发帖数: 10
2

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.
Null values usually indicate data that is unknown, not applicable, or to be
added at a later time. For example, a customer's middle initial may not be
known at the time the customer places an order.

【在 s**********r 的大作中提到】
: why? thanks
s**********i
发帖数: 711
3

NULL is NULL. null is not unkown. if you know a value
is null, it's not any other value, it's just null.
basically null means no set value.

【在 f***g 的大作中提到】
:
: 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.
: Null values usually indicate data that is unknown, not applicable, or to be
: added at a later time. For example, a customer's middle initial may not be
: known at the time the customer places an order.

h****e
发帖数: 204
4
nop, NULL is NULL, which means uncomparable "value", if this makes some
sense to you.

【在 s**********r 的大作中提到】
: why? thanks
l********h
发帖数: 16
5
What did you try to do?
Why did you want to compare NULL to NULL?
Could you provide your SQL statement?

【在 s**********r 的大作中提到】
: why? thanks
h*****n
发帖数: 439
6
well, maybe this is useful for dating service, bf/gf search engine. :P
select a.ID, a.FirstName, a.LastName, b.ID, b.FirstName, b.LastName
from Male a, Female b
where ( a.GirlFriendID IS NULL and a.IsGay = FALSE and
b.BoyFriendID IS NULL and b.IsLesbian = FALSE)

【在 l********h 的大作中提到】
: What did you try to do?
: Why did you want to compare NULL to NULL?
: Could you provide your SQL statement?

1 (共1页)
进入Database版参与讨论
相关主题
MS T-SQL 问题COMBINE RECORDS
求教个MS SQL的问题correlated subquery
谁给我优化一下把重复的产品下架的SQLAbout INSERT IGNORE
请教大牛一道有趣的SQL题DW BI ETL 问题 - Data Validation and Recordset Comparison (转载)
[转载] Can anyone interpret this simple SQL?Problem when using SQL " Insert...." to AutoNumber.
问一个SQL Server的问题Help needed in SQL
帮忙解释下这个查询,有关NULL的今典问题: 这个Self Query咋写?
紧急求助, 关于SQL ServerAccess门外汉问题求教
相关话题的讨论汇总
话题: null话题: value话题: dbms话题: unknown话题: false