Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我有一个简单的查询,它给出了这个结果
我想修改如下。Name 列成为列标题,studentID 列成为第一行
WITH t AS (SELECT 1001 studentid, 'john' NAME FROM dual UNION ALL SELECT 1002, 'kane' FROM dual ) SELECT * FROM ( SELECT studentid, NAME FROM t) pivot (max(studentid) for name in ('john' John, 'kane' Kane));