where sex='男');
法2:select sc.sno,student.sname as 学生姓名,
student.sex as 学生性别,sc.cno,sc.grade,course.cname
from student inner join (sc inner join course on sc.cno=course.cno) on student.sno=sc.sno where sex='男' and cname='数据库系统';
(23)查询所有比刘涛年龄大的教师姓名、年龄和刘涛的年龄; Select tname,age From teacher
Where age>(select age From teacher
Where tname='刘涛') Union
Select tname,age From teacher
Where tname='刘涛';
/*Select teacher.tname as 教师姓名,teacher.age as 年龄,*/
(24)查询不讲授“8104”号课程的教师姓名。 select teacher.tname from teacher where not exists ( select *
from course
where cno='8104' and tno=teacher.tno);
11