Reputation: 11
I want to know if it's possible to concatenate two columns in the second column by a query.
Example:
Reference | Description
ref1 | Des1
ref2 | Des2
ref3 | Des3
Result:
Reference | Description
ref1 | Des1 ref1
ref2 | Des2 ref2
ref3 | Des3 ref3
Upvotes: 1
Views: 99
Reputation: 1269563
The function concat_ws()
does what you want:
select t.*, concat_ws(' ', reference, description)
from t;
You can incorporate this into an update
or computed column.
Upvotes: 2