**有没有什么方法可以直接把中间两列变成行啊 **
不行的话
这是我在百度找的代码会报错提示 无效数字
SELECT T.COLUMN_NAME,
SUM(CASE T.COLUMN_NAME WHEN 'MORDERITEMID' THEN T.COMMENTS END) AS MORDERITEMID,
SUM(CASE T.COLUMN_NAME WHEN 'MORDERID' THEN T.COMMENTS END) AS MORDERID,
SUM(CASE T.COLUMN_NAME WHEN 'ORDERNO' THEN T.COMMENTS END) AS ORDERNO
FROM PLMBOMIMPORTCONFIG T GROUP BY column_name