Check out example codes for "sql select merge multiple values". It will help you in understanding the concepts better.

Code Example 1

DECLARE @combinedString VARCHAR(MAX)
SELECT @combinedString = COALESCE(@combinedString + ', ', '') + column_name
FROM table_name
WHERE ID = 1234

SELECT @combinedString as StringValue

Learn ReactJs, React Native from akashmittal.com