In MySQL:
[SQL] Viewplaincopyprint?--single-row stitching, first find a row, plus a comma, and then the next line of stitching isolatedSelectGroup_concat (E.support) fromENGINES EwhereE.xainch('YES','NO') --The results are as follows: Yes,yes,yes,yes,yes,yes,default,yes --replace the "," in the result of the query with the "* *" numberSelect REPLACE(Group_concat (E.support),',','**') fromENGINES EwhereE.xainch('YES','NO') --The results are as follows: Yes**yes**yes**yes**yes**yes**default**yes --remove duplicate records from the results of the query, leaving only one record and then stitchingSelectGroup_concat (DISTINCT(e.support)) fromENGINES EwhereE.xainch('YES','NO') --The results are as follows: Yes,default --multi-column splicing, the same row of the first splicing, plus a comma, and then splicing the next lineSelectGroup_concat (E.engine,e.support) fromENGINES EwhereE.xainch('YES','NO') --The results are as follows: Mrg_myisamyes,myisamyes,blackholeyes,csvyes,memoryyes,archiveyes,innodbdefault,performance_schemayes
Use SQL to stitch the values of multiple columns into a string "reprint"