select employee_id, CONCAT(first_name , last_name)
from employees;
# CONCAT을 사용하면 칼럼 값끼리 합칠 수 있다.
Bash
복사
select employee_id, CONCAT(CONCAT(first_name, ' '), last_name)
from employees;
# first_name과 ' '를 합친 후 first_name과 ' '를 합친값과 last_name을 또 합친다.
Bash
복사
select last_name, UPPER(CONCAT(last_name, '_US')) as NAME
from employees
where department_id = 60
# last_name을 대문자로 바꾸고, 뒤에 __US를 붙인 후
Bash
복사
select CONCAT('test ', '1234') from DUAL;
# DUAL은 빈값이고 행이 하나임
Bash
복사
