「postgresql入門」演算子を使って文字列を連結するコード

SQL構文例
SELECT DISTINCT
T1.*
,T1.カラムA || ‘#’ || T1.カラムB  TESTCD
, T2.カラムC || ‘_’ || T3.カラムC TESTNAME
FROM
TEST_TABLE1 T1
LEFT JOIN TEST_TABLE2 T2
ON T1.ID = T2.ID
LEFT JOIN TEST_TABLE3 T3
ON T1.カラム1 = T3.カラム2
ORDER BY
, T1.xxx
, T2.xxx

Comments are closed.