--1.[行列转换] --列转行 USE tempdb GO IF (OBJECT_ID('DEPT') IS NOT NULL) DROP TABLE DEPT CREATE TABLE DEPT(NAME VARCHAR(5),COL1 INT,COL2 INT,COL3 INT,COL4 INT,COL5 INT,COL6 INT) INSERT INTO DEPT SELECT 'A',10,50,20,30,0,80 UNION ALL SELECT 'B',50,20,10,10,2…