Created
February 27, 2012 13:00
-
-
Save andreia/1923576 to your computer and use it in GitHub Desktop.
ORACLE: Empty / NULL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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