以下的表数据中如何得到每门分数都大于80的学生姓名? homework,select 姓名 from tab_name where 姓名 not in (select 姓名 from tab_name where 成绩 <= 80) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select A.姓名from (select t.姓名 姓名, min(t.成绩) 成绩 from 表名 t group by t.姓名) Awhere A.成绩 >= 80 select DISTINCT 姓名 from table a where not exists(select 1 from table b where a.姓名 = b.姓名 and b.成绩 < 80) select distinct 姓名 from table_name where 成绩 >80这样也行啊 select 姓名 from tab_name where 姓名 not in (select disticnt 姓名 from tab_name where 成绩 <= 80) 最好不要用in,姓名 not in (集合), 就用不了索引了,全表遍历. select a.姓名 from tab_name a where not exists (select * from tab_name b where b.成绩 <= 80 and a.姓名=b.姓名) 悲观锁的问题 哪位大虾帮我解决下Oracle导入的密码问题,急急急! 急求!! oracle 日志分类和用途 备份、恢复问题 Oracle中金额转换成大写的函数! 在线等!! 提个问题 请问:在ORACLE中运行多个SQL用什么符号间隔 多表联结查询.求助! 如何在热redhat 下查看访问oracle的ip记录。 ●为什么日期没有“时:分:秒”? 我已经安装好了oracle 9i,为什么还提示下面这个呢?
from
(select t.姓名 姓名,
min(t.成绩) 成绩
from 表名 t
group by t.姓名) A
where A.成绩 >= 80
from table a
where
not exists(
select 1 from table b where a.姓名 = b.姓名 and b.成绩 < 80
)
这样也行啊
姓名 not in (集合), 就用不了索引了,全表遍历.