union和union all是对select语句的结果集进行合并,且select语句必须拥有相同数量的列 union 去重且排序 union all 不去重不排序 举例 查询学号为06的学生id和所选课程id select s_id,c_id from score where s_id = '06' 查询结果 查询结果查询考试成绩不及格的学生id和所选课程id select s_id,c_id from score where s_score < 60 查询结果