The code I came up with is a slight modification of a previous post:
select STUFF((SELECT char(9) + name FROM(SELECT c.nameFROM syscolumns c inner join sysobjects o on c.id = o.idwhere o.name = 'your-table-name') AS Y--ORDER BY names -- optional sorting of the column namesFOR XML PATH('')),1, 1, N'')
No comments:
Post a Comment