V SQL Server 2017 byla přidána funkce STRING_AGG
SELECT t.name as TableName
,STRING_AGG(c.name, ';') AS FieldList
FROM sys.tables t
JOIN sys.columns c
ON t.object_id = c.object_id
GROUP BY t.name;
V SQL Server 2017 byla přidána funkce STRING_AGG
SELECT t.name as TableName
,STRING_AGG(c.name, ';') AS FieldList
FROM sys.tables t
JOIN sys.columns c
ON t.object_id = c.object_id
GROUP BY t.name;