您如何做到这一点:
SELECT CONCAT(FIRST_NAME,' ' ,LAST_NAME, ADDRESS1, CITY,', ',STATE, ZIP) AS NAME
给出如下结果:
Joe Donuts
123 Main St
New York, NY 11111
我尝试添加'\ n'无效。
答案 0 :(得分:0)
尝试将CONCAT_WS
与\n
用作换行符:
SELECT
CONCAT_WS('\n', CONCAT(FIRST_NAME, ' ', LAST_NAME),
ADDRESS1,
CONCAT(CITY, ', ', STATE, ' ', ZIP)) AS NAME
FROM yourTable;