当前位置:Gxlcms > 数据库问题 > 用一条sql语句查询出“每门”课程都大于80分的学生姓名

用一条sql语句查询出“每门”课程都大于80分的学生姓名

时间:2021-07-01 10:21:17 帮助过:5人阅读

Name chengji fengshu
张三 数学 75
张三 语文 81
李四 数学 90
李四 语文 76
王五 数学 81
王五 语文 100
王五 英语 90


SQL Server:

select distinct [Name] from [表] where [Name] not in (
select [Name] from [表] where [fengshu]<=80
)

或者

select distinct name from A

minus

select name from A where fenshu<80

用一条sql语句查询出“每门”课程都大于80分的学生姓名

标签:

人气教程排行