1.sql server 转置很容易搜到方法,一般需要手动写转置的列项,如果多时会比较烦,下面试了省事的方法: --案例需求数据 ----方法一:if object_id('tempdb.dbo.#student') is not null drop table #studentselect dcdate,student,scoreinto #studentfrom ABC.dbo.t_student_mx where dcdate='20180201': declare @sql varcha…