select concat(first_name,' ',last_name) as "full name "from employees
答案 0 :(得分:4)
Oracle的CONCAT
函数仅接受两个参数。因此,如果您想继续使用当前的确切方法,则必须将两个对CONCAT
的调用链接在一起:
SELECT CONCAT(CONCAT(first_name, ' '), last_name) AS "full name"
FROM employees;
或者,您可以只使用ANSI标准串联运算符||
:
SELECT first_name || ' ' || last_name AS "full name"
FROM employees;
答案 1 :(得分:1)
使用运算符||
:
select (first_name || ' ' || last_name) as full_name
from employees
答案 2 :(得分:1)
使用||
select first_name || ' ' || last_name as "full name" from employees;
如果您想使用CONCAT运算符,可以尝试以下操作:
SELECT CONCAT(CONCAT(first_name , ' '),LAST_NAME) AS "full name"
FROM employees;