QL> select * from student;
IDNAME CHINESE MATH ENGLISH
--------- -------- ---------- ---------- ----------
1A 90 70 80
2B 80 70 90
3C 80 90 70
select id,name,'chinese' 課程,chinese 分數
from student
union all
select id,name,'math' 課程,math 分數
from student
union all
select id,name,'english' 課程,english 分數
from student
IDNAME 課程 分數
---------- -------- ------- ----------
1A chinese 90
2B chinese 80
3C chinese 80
1A math 70
2B math 70
3C math 90
1A english 80
2B english 90
3C english 70
已選擇9行。