📅  最后修改于: 2022-03-11 15:05:13.098000             🧑  作者: Mango
DECLARE @combinedString VARCHAR(MAX)
SELECT @combinedString = COALESCE(@combinedString + ', ', '') + column_name
FROM table_name
WHERE ID = 1234
SELECT @combinedString as StringValue