【发布时间】:2011-04-02 17:02:57
【问题描述】:
我找到了这个网站:here
它很好地描述了它为什么有效,为什么不有效。
但我的问题有点不同。
select 'true' from dual where 'test' not in ('test2','');
为什么这个查询不返回一行?'' 是否像 null 一样处理?
感谢您的帮助
【问题讨论】:
-
我不确定(我是 SQL Server 人员),但我认为 Oracle 确实将 '' 视为 null。
-
@APC - 不是真的。这个问题是
does it...?不是why does it...? -
@MartinSmith - 我认为这个问题的答案也回答了这个问题。所以在某种程度上它是重复的。
标签: sql oracle null behavior string