MySQL文字列関数CONCAT_WS
CONCAT

CONCAT_WS文字列関数

SUBSTRING

区切り文字を間に挟んで文字列を連結します。

構文

CONCAT_WS(sep, s1, s2, ...)

使用例

下記の値を入力するとサンプルに即時反映されます。

city
state
country
address
customers
SELECT CONCAT_WS(', ', city, state, country) AS address
FROM customers;