data A | data B |
---|---|
apple | apple, banana, cat |
banana | apple, banana, cat |
cat | apple, banana, cat |
SELECT
data A,
'' as data B
From tbl_test;
If I have data like Column data A and I want to combined this data to another column like data b
How can I query this one and show like I want
Sorry for my news sql
1条答案
按热度按时间lb3vh1jj1#
By using
STUFF
we can combine all column data into single column by writing Subquery it will give's Result to all columns suitable forSQL Server 2014
. Code is as follows.