oralce写法:

select WM_CONCAT(A.title) as citys from tmpcity A

 

sql server写法:

select stuff((select ','+A.title from tmpCity A FOR xml PATH('')), 1, 1, '') as citys

 

mysql写法:

select GROUP_CONCAT(A.title) as citys from tmpcity A;      --默认的逗号分隔
select GROUP_CONCAT(A.title SEPARATOR  ' ') as citys from tmpcity A;   --用空格分隔

内容来源于网络如有侵权请私信删除
你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!