CONCAT'ing NULL fields

前端 未结 11 849
小鲜肉
小鲜肉 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:19

    If you get (like I do in MySQL):

    #1582 - Incorrect parameter count in the call to native function 'ISNULL'
    

    You can replace ISNULL function by COALESCE:

    CONCAT(COALESCE(FirstName,''),COALESCE(LastName,''),COALESCE(Email,''))
    

提交回复
热议问题