Q:

Write down the query to display all student name in one cell seprated by ‘,’ example:-“Sara, David, Dora, Jack, Vikram, Ross”.

0

Write down the query to display all student name in one cell seprated by ‘,’ example:-“Sara, David, Dora, Jack, Vikram, Ross”.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Declare @name varchar(MAX) = ''
Select @name = @name + FirstName + ', ' from [tblStudent]
Select SUBSTRING(@name,1, LEN(@name)) As StudentList

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Top 100 SQL server queries Interview questions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write down the query to create tblstudent table wi... >>
<< Write down the query to print first letter of a Na...