Concepts Covered In This Video Include:-
How To Connect To SQL SERVER using management studio.
2.How to create a new database using managemen...
For further actions, you may consider blocking this person and/or reporting abuse
Actually, STUFF() doesn't generate anything. It just replaces the first comma in the string with the emptiness. The string is generated by
FOR XML.Anyway, this approach is very good and I use it quite often. But SQL Server version 2017 and higher has another very good function STRING_AGG()
Just for information, because your version is 2016.
For instance your example will be looking like the code below:
This is the result:
Thanks @rozhnev for your great tool (not sponsored)! I just have SQL Server V.2014 on my machine and it's difficult to show new functionality using it.