我试图弄清楚为什么下面的SQL语句不会在oracle中返回值do
Select 'do' from dual
where trim(' ') = ''
Run Code Online (Sandbox Code Playgroud)
在哪里
Select 'do' from dual
where trim(' a ')='a'
Run Code Online (Sandbox Code Playgroud)
返回值do.
因为trim(' ')
回报null
而不是''
在Oracle 8中,没有零长度字符串这样的东西.任何来自函数调用或文字''的零长度字符串都被视为null.