作者dinos (守护神)
看板Database
标题Re: [SQL ]有关 not like
时间Tue Jul 20 21:40:38 2010
※ 引述《dennis277 (我爱直话直说)》之铭言:
: 各位晚安,有个关於not like的问题请教於各位前辈
: 栏位一
: 1. V
: 2.null
: 3. ''
: 小弟想将SQL中栏位一中不like "v"值全数列出
: 所以...
: 当我select like '%v%'的时候 1.项目会跑出来
: 但反过来select not like '%v%'时 2.却搜寻不出来(但3.会!)
: 请问是哪里出问题呢!?
: 还请多指教了 谢谢
This is because NULL NOT LIKE expr always returns NULL, regardless
of the value of expr. The same is true for aggregate queries involving
NULL and comparisons using NOT RLIKE or NOT REGEXP.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 211.76.137.169