Home >Database >Mysql Tutorial > 把一列多行数据合并成一条数据

把一列多行数据合并成一条数据

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:44:251369browse

declare @returnItem nvarchar(max) set @returnItem='' select @returnItem=@returnItem+','+[name] from 【TableName】 print @returnItem

declare @returnItem nvarchar(max)
set @returnItem=''
select @returnItem=@returnItem+','+[name] from 【TableName】

print @returnItem

,网站空间,香港服务器,网站空间
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article: SQL SERVER 1 数据库设计Next article:SQL优化之not in