CONCAT'ing NULL fields

前端 未结 11 868
小鲜肉
小鲜肉 2021-02-01 00:25

I have a table with three fields, FirstName, LastName and Email.

Here\'s some dummy data:

FirstName | LastName | Email
Adam        West       adam@west.c         


        
11条回答
  •  暖寄归人
    2021-02-01 01:11

    Stefan's answer is correct. To probe a little bit deeper you need to know that NULL is not the same as Nothing. Null represents the absence of a value, or in other words, not defined. Nothing represents an empty string which IS in fact a value.

    Undefined + anything = undefined

    Good database tidbit to hold onto!

提交回复
热议问题