--这道题,有点小坑 本来有两种解法,但是因为这道题着重考察union all所以那种方法不能用 其实 用union才与where university = '山东大学',gender = 'male'; 这两个才相同,毕竟union与union all用法不同 看来是我错怪他了。 select device_id, gender, age, gpa from user_profile where university = '山东大学' union all select device_id, gender, age, gpa from user_profile where gender = 'male';