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 !'
![Share/Bookmark](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_sWuh_rLF3oqyvgK38-VDFIDrpAp8UVLc6s9Ky4MhPr2vEOpTIRjuZLenPa2SH2n4AAbeuQmFGT8Fnq5Xw9w0kYrcD94yAs9F7nuZ5ohFNZsaJWi6czzAHLeQg=s0-d)
T-SQL - NULL does not equal NULL
No comments:
Post a Comment