declare @sql varchar(8000)set @sql ='select Name as 姓名'select @sql = @sql+' , max(case Subject when ''' + Subject + ''' then Result else 0 end) Subject'from (select distinct Subject from tb) as aset @sql = @sql + ' from tb group by name'exec(@sql) 这个Sql 语句 哪里错了 ,找了半天也没找出来,求大神 帮下忙
添加回答
举报
0/150
提交
取消