select s.sname, count(*)
from suppliers s, parts p, catalog c
where p.pid = c.pid and c.sid = s.sid
group by s.sname, s.sid
having every (p.color = 'green')
select s.sname, max(c.cost)
from suppliers s, parts p, catalog c
where p.pid = c.pid and c.sid = s.sid
group by s.sname, s.sid
having some (p.color = 'green') and some (p.color = 'red')
当我执行以上两个查询时,它显示缺少右括号。
答案 0 :(得分:1)
Oracle不支持拥有EVERY
或SOME
您可以使用带有Haves子句的case when
语句来处理它。