it does not runing,please show me where I have a mistake?
SELECT CONCAT(FIRST_NAME,',',LAST_NAME) as full_name FROM EMPLOYEES;
it does not runing,please show me where I have a mistake?
SELECT CONCAT(FIRST_NAME,',',LAST_NAME) as full_name FROM EMPLOYEES;
Use ANSI SQL's ||
instead to concat:
SELECT FIRST_NAME || ',' || LAST_NAME as full_name FROM EMPLOYEES;
(CONCAT()
function takes two arguments only.)
Concat only expects two Parameter, so you have to use nested concats:
SELECT CONCAT(CONCAT(FIRST_NAME,','), LAST_NAME) as full_name FROM EMPLOYEES;
For more informations see the Oracle documentation
concat takes 2 arguments. Try using it twice, like:
SELECT CONCAT(CONCAT(FIRST_NAME,','), LAST_NAME) as full_name FROM EMPLOYEES;
concat(String, String) is only use 2 parameters. If you want use ','
SELECT FIRST_NAME||','||LAST_NAME as full_name FROM EMPLOYEES