firstName - lastName - dob - region - authority
这是使用
的查询 SELECT firstName, lastName, region from whatever
是否可以在结果中合并firsName和lastName,我需要在实际数据库中保持firstName和lastName分开但是在结果中合并它们 -
firstname lastname - region
答案 0 :(得分:0)
试试..
SELECT CONCAT(firstName,' ',lastName) as Name, region from whatever
答案 1 :(得分:0)
您的查询将如下:
<强>甲骨文:强>
SELECT firstname || ' ' || lastname as name, region from whatever
<强> MySQL的:强>
SELECT CONCAT(firstname ,' ', lastname) as name, region from whatever
<强> MSSQL:强>
SELECT firstname + ' ' + lastname as name , region from whatever
答案 2 :(得分:0)
我愿意:
SELECT firstName || ' ' || lastName as name, region from whatever;