SQL Server query to display all student name in one cell seperated by ','

Amatya
Posted by Amatya under Sql Server category on | Points: 40 | Views : 860
SQL Server query to display all student name in one cell seperated by ','

Declare @name varchar(MAX) = ''
Select @name = @name + FirstName + ', ' from tblDNFRec
Select SUBSTRING(@name,1, LEN(@name)) As FirstName


Output:
Amatya
Aditya

Comments or Responses

Posted by: Rakesh23 on: 11/17/2017 Level:Starter | Status: [Member] | Points: 10
It is good to know that http://generateimvucredits.com make us free imvu credits.

Login to post response