摘要: 例如student表:studentIDstudentNamestudentScore01Alice9002Bill9503Cindy100一、拼接多个字段的值select studentID+‘-’+studentName+'-'+studentScore AS studentInfo from student结果:二、一个字段多条记录的拼接select stuff((select '|'+studentName from student for xml path ('')),1,1,'')结果:解析:①stuff:1、作用st 阅读全文
posted @ 2013-12-27 16:43 亦无道 阅读(5279) 评论(0) 推荐(0) 编辑