I currently have them separated but would prefer to have both together in one column.
我目前将它们分开,但更愿意将它们放在一列中。
2 个解决方案
#1
0
SELECT CONCAT(given, ' ', surname) AS fullname FROM tablename
or for null safe,
或者对于零安全,
SELECT CONCAT_WS(' ', given, surname) AS fullname FROM tablename
#2
0
you can concatenate them using:
你可以使用以下方法连接它们:
select CONCAT(given,' ',surname) as fullname;
#1
0
SELECT CONCAT(given, ' ', surname) AS fullname FROM tablename
or for null safe,
或者对于零安全,
SELECT CONCAT_WS(' ', given, surname) AS fullname FROM tablename
#2
0
you can concatenate them using:
你可以使用以下方法连接它们:
select CONCAT(given,' ',surname) as fullname;