• solution 3

    select LEFT(concatenations,len(concatenations)-1) from

    (select (select cast(name as varchar)+','from fruit order by id for xml path('')) as concatenations)a