例如数据 列Name
declare @test table( namevarchar(10)) insert into @testvalues('a'),('b'),('c'),('d'); select distinct (select cast(name asvarchar(2))+'*'from @test for xml path(''))as name from @test