2012年4月25日
摘要: 实验室表:LaboratoryRoom标签表:Tag关系表:Lab_Tagselect lab.Name,STUFF( ( SELECT ',' + isnull(TagName,'') FROM Tag WHERE Id in (select TagId from Lab_Tag where LabId = lab.Id) FOR XML PATH('') ), 1, 1, '') as tags from dbo.LaboratoryRoom as labstuff函数用于去掉多余的逗号stuff函数用法:select STU 阅读全文
posted @ 2012-04-25 21:14 阿蛆 阅读(436) 评论(0) 推荐(0) 编辑