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'
union: 对两个结果集进行并集操作,去重,同时按默认顺序排序。
union all: 对两个结果集进行并集操作,不做去重,显示所有结果。只是合并罢了。



京公网安备 11010502036488号