日期:2014-05-18 浏览次数:20495 次
create table #test( name varchar(10) ) go insert #test select 'tracy' union all select 'lucy' union all select 'kobe' go declare @str varchar(50) set @str='' select @str=@str+','+name from #test select RIGHT(@str,LEN(@str)-1) as name /* name tracy,lucy,kobe */