DB/PostgreSQL

[PostgreSQL] postgreSQL 문자열 합치기

ehdtnn 2019. 5. 29. 14:09
반응형

변경 전

> select to_char(now(), 'YYYY-MM-DD') as today

-----------------------------------------------------------

today

2019-05-29

 

변경 후

> select to_char(now(), 'YYYY-MM-DD' || ' 입니다') as today

-----------------------------------------------------------

today

2019-05-292019-05-29 입니다

 

 

|| 를 사용해서연결

 

 

 

SELECT
A.aprv_id ||'(' || B.position || ')' as id_position
FROM 
sct_aprv_route A 
LEFT JOIN 
sct_user B on A.aprv_id = B.uid

----------------------------------------

결과값

아이디(포지션)

 

 

반응형