I have a table 'table A' as below and I want to select these data into one column and the result will update table B
+-----------+
| ID | Name |
+-----------+
| 1 |a |
+-----------+
| 2 |b |
+-----------+
| 3 |c |
+-----------+
Result:
Name
-----
a b c
Use STRING_AGG()
SELECT
STRING_AGG(name,' ') Name
FROM
yourtable