sql multiple rows to comma separated column inside select query code example
Example: convert rows to string sql server
Select CountryName from Application.Countries
Declare @val Varchar(MAX);
Select @val = COALESCE(@val + ', ' + CountryName, CountryName)
From Application.Countries Select @val;