SELECT *
FROM (SELECT ‘syr1‘ SYR, ‘xyx‘ XX FROM DUAL)
PIVOT(MAX(XX) -- pivot一定要用到聚合函数
FOR SYR IN(‘syr1‘ "syr1", ‘syr2‘ "syr2", ‘syr3‘ "syr3", ‘syr4‘ "syr4"))
WHERE 1 = 1;
把这行
转成列的形式
2022-04-05 00:20:47
SELECT *
FROM (SELECT ‘syr1‘ SYR, ‘xyx‘ XX FROM DUAL)
PIVOT(MAX(XX) -- pivot一定要用到聚合函数
FOR SYR IN(‘syr1‘ "syr1", ‘syr2‘ "syr2", ‘syr3‘ "syr3", ‘syr4‘ "syr4"))
WHERE 1 = 1;
把这行
转成列的形式