create function func ( @a int) returns varchar(4000)
as
begin
declare @str varchar(4000)
select @str = ''
select @str = @str + b from test_c where a =@a
return @str
end
go
select a ,dbo.func(a) from test_c group by a注释]:a,b是字段名
as
begin
declare @str varchar(4000)
select @str = ''
select @str = @str + b from test_c where a =@a
return @str
end
go
select a ,dbo.func(a) from test_c group by a注释]:a,b是字段名
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货