📜  sql select 合并多个值 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:56.285000             🧑  作者: Mango

代码示例1
DECLARE @combinedString VARCHAR(MAX)
SELECT @combinedString = COALESCE(@combinedString + ', ', '') + column_name
FROM table_name
WHERE ID = 1234

SELECT @combinedString as StringValue