Convert multiple columns into a single column separated by comma

Okay - you could then use CONCAT:

Select Id
     , name
     , concat(Mon, ',', Tue, ',', Wed, ',', Thu, ',', Fri, ',', Sat, ',', Sun)
  From employee

The advantage of using CONCAT is that it handles NULL values for you...if the value is NULL it will be converted to an empty string.

2 Likes