mysql - 拼接多个字段

方法介绍

concat_ws(分隔符,需要拼接在一起的字段)

 

实例

SELECT
day_catering.S_ID,

day_catering.S_DAY_WEEKS_CAPTION,

concat_ws(

  ' , ',

  BREAKFAST.RECIPE01_CAPTION,

  BREAKFAST.RECIPE02_CAPTION,

  BREAKFAST.RECIPE03_CAPTION,

  BREAKFAST.RECIPE04_CAPTION,

  BREAKFAST.RECIPE05_CAPTION

) AS BREAKFAST_RECIPE

 

posted @ 2018-12-19 16:31  萧韶九成  阅读(908)  评论(0编辑  收藏  举报