学习无止境!

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年12月13日

摘要: create table tb ([id] int,[name] varchar(2))insert into tbselect 1,'aa' union allselect 2,'bb' union allselect 1,'cc' union allselect 3,'dd' union allselect 2,'ee'select * from tb--查询select id, name=stuff((select ','+name from tb where id=t.id for xml path('')),1,1,'')from tb tgroup by id方法二:CREATE 阅读全文
posted @ 2010-12-13 10:45 钻石眼泪 阅读(498) 评论(0) 推荐(0) 编辑