I have a table in SQL Server that looks like this:
id: int
key: nvarchar(max)
value: nvarchar(max)
I want to select distinct keys as first column and all values with same key joined with '<br/>' as my second column. The key values are dynamic and is not predefined - and the performance really matters - I don't want to use Linq or any UDF!
id    key      value
---------------------------------------
1     color    red<br/>white<br/>black
4     size     15"
PS: I have searched a lot sorry if it's duplicated, currently running on SQL Server 2014 but I can move to 2019
 
     
    