I SQL Server 2017 har STRING_AGG-funktionen lagts till
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;
I SQL Server 2017 har STRING_AGG-funktionen lagts till
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;