摘要:
例如student表:studentIDstudentNamestudentScore01Alice9002Bill9503Cindy100一、拼接多个字段的值select studentID+‘-’+studentName+'-'+studentScore AS studentInfo from student结果:二、一个字段多条记录的拼接select stuff((select '|'+studentName from student for xml path ('')),1,1,'')结果:解析:①stuff:1、作用st 阅读全文