IF NOT OBJECT_ID('[ZZZ]') IS NULL
DROP TABLE [ZZZ]
GO
CREATE TABLE [ZZZ](
[tid] int identity(1,1) primary key,
[title] NVARCHAR(100))
go
INSERT [ZZZ]
SELECT 'AA' UNION ALL
SELECT 'AB' UNION ALL
SELECT 'AC'
GO
----SELECT * FROM ZZZ
DECLARE @strResult Nvarchar(Max)
set @strResult=''
SELECT @strResult=[Title]+','+@strResult from ZZZ
set @strResult=substring(@strResult,1,(len(@strResult)-1))
print @strResult
/*
AC,AB,AA
*/
declare @s nvarchar(max)
set @s=''
select @s=@s +column + ',' from table
select stuff(col,1,1,'') from ( SELECT ','+COLUMN as col FROM TABLE FOR XML PATH('')) a