MySQL combine two columns into one column

后端 未结 10 996
后悔当初
后悔当初 2020-11-29 00:46

I\'m trying to find a way to combine two columns into one, but keep getting the value \'0\' in the column instead to the combination of the words.

These are what I\'

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 01:42

    I have used this way and Its a best forever. In this code null also handled

    SELECT Title,
    FirstName,
    lastName, 
    ISNULL(Title,'') + ' ' + ISNULL(FirstName,'') + ' ' + ISNULL(LastName,'') as FullName 
    FROM Customer
    

    Try this...

提交回复
热议问题