Discover merge multiple worksheets, include the articles, news, trends, analysis and practical advice about merge multiple worksheets on alibabacloud.com
Tags: mysq share picture BSP City DIV SQL statement alt space OralceEffect:Oralce notation:Select Wm_concat (a.title) as Citys from Tmpcity ASQL Server notation:Select Stuff ((select ', ' +a.title from tmpcity A for XML PATH (') '), 1, 1, ") as CitysMySQL notation:Select Group_concat (a.title) as citys from Tmpcity A; --The default comma-delimitedSelect Group_concat (A.title SEPARATOR ") as Citys from Tmpcity A; --separated by a spaceSQL statement Merge
Label:Sample table TB data is as follows ID value—————1 AA1 BB2 AAA2 BBB2 CCC First Kind SELECTID,[Val]=(SELECT [value] +','
fromTb asbWHEREb.ID=a.id forXML PATH ("') )
fromTb asA The first display of results 1 AA,BB,1 AA,BB,2 AAA,BBB,CCC,2 AAA,BBB,CCC,2 AAA,BBB,CCC, The second Kind SELECTID,[Val]=(SELECT [value] +','
fromTb asbWHEREb.ID=a.id forXML PATH ("') )
fromTb asaGROUP byId The second kind of display 1 AA,BB,2 AAA,BBB,CCC, Third (rep
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.