ORACLE TRIM function -


suppose column defined as:

col varchar2(5) 
  • if col='x' true;
  • if trim(col)=trim('x') true;
  • but if col contains ' ', if trim(col)=trim(' ') false;

why?

thanks

oracle doesn't support empty strings ''; oracle uses null instead (whenever result should empty string you'll null in fact). since

  null = null -- <- null (and not true)  

your formula

  trim(col) = trim(' ') -- <- equals "null = null" 

is null (and not true) too


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -