select t.student,decode(t.java,'','','java') 科目, t.java from student t union select t.student,decode(t.c,'','','c') 科目, t.c from student t