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行。