student subject grade
student
student
student
student
student
student
轉換為
語文 數學 英語
student
student
語句如下
select student
sum(decode(subject
sum(decode(subject
from table
group by student
c
轉換為
這一類型的轉換必須借助於PL/SQL來完成
CREATE OR REPLACE FUNCTION get_c
RETURN VARCHAR
IS
Col_c
BEGIN
FOR cur IN (SELECT c
Col_c
END LOOP;
Col_c
RETURN Col_c
END;
From:http://tw.wingwit.com/Article/program/Oracle/201311/18997.html