Skip to content

Instantly share code, notes, and snippets.

@andreia
Created February 27, 2012 13:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save andreia/1923576 to your computer and use it in GitHub Desktop.
ORACLE: Empty / NULL
decode(trim(col),NULL,NULL,col) is NULL
-- http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements005.htm
-- Do not use null to represent a value of zero, because they are not equivalent.
-- Note: Oracle Database currently treats a character value with a length of zero as null.
-- However, this may not continue to be true in future releases, and Oracle recommends that
-- you do not treat empty strings the same as nulls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment