我试图弄清楚为什么下面的sql语句不会在oracle中返回值do
Select 'do' from dual where trim(' ') = ''
在哪里
Select 'do' from dual where trim(' a ')='a'
返回值do.
解决方法
因为trim(”)返回null而不是”
In Oracle 8,there is no such thing as a zero-length string. Any zero-length string,either from a function call or the literal ”,is treated as null.