Be careful of this when coding. NULL does not equal NULL, you can test it with following code, weird? No! because NULL does not present a value to be able to be equal to another value!
IF (NULL=NULL)
PRINT 'NULL is equal to NULL'
ELSE
PRINT 'NULL is not equal to NULL !'
T-SQL - NULL does not equal NULL
No comments:
Post a Comment