字符串合并与拆分写法小结参考.pdfVIP

  • 6
  • 0
  • 约4.84千字
  • 约 6页
  • 2021-12-02 发布于福建
  • 举报
字符串合并与拆分写法小结 一. 字符合并 ? 1 if OBJECT_ID(ConcatStr) is not null 2 drop table ConcatStr 3 GO 4 create table ConcatStr 5 ( 6 ID int, 7 Code varchar(10) 8 ) 9 GO 10 insert into ConcatStr 11 select 1,XXX union all 12 select 1,YYY union all 13 select 2,PPP union all 14 select 2,QQQ 要得到这样的结果: ? 1 ID Code 2 1 XXX,YYY 3 2 PPP,QQQ 1. 用游标 ? 1 declare @t table(ID int, Code varchar(1000)) 2 declare @id int 3 declare c cursor fo

文档评论(0)

1亿VIP精品文档

相关文档