1.对的,笛卡儿积
2.语法错,
select a_name,count(*) ”number of employees”
from a,b where ano = a_no
group by a_name
having count (*) > 5
order by 2 desc;
2.语法错,
select a_name,count(*) ”number of employees”
from a,b where ano = a_no
group by a_name
having count (*) > 5
order by 2 desc;
解决方案 »
- 在ORACLE里为何建一个只读用户,并授权只能查看其中几个表。
- 小问题.! 看看你能用几种办法解决
- oracle查询数据
- 在Oracle服务器端如何判断所连接的客户端应用程序的类型?
- oracle8热备份恢复问题大家帮忙看看,谢谢!
- 请教一个序列的方法,谢谢大家
- 紧急求助:怎么在SQL Server中建立dts包转换数据到oracle
- 关于数据库恢复!
- Oralce向SQL导数据问题,请高手帮忙,给提供一个好的解决方案,先谢谢大家,希望大家积极参与,来者有分(急)。
- 哪位高手知道oracle9i的备份与恢复的一般方法啊!
- 一个关于group by排序的问题
- oracle8.1.7中用哪个用户可以执行RECOVER DATABASE,来恢复数据库。
像sum,count,avg等函数时不能出现在where语句里
他们做条件时候用在having里
2.group by 时,count()要放在having 里.应改成:select a_name,count(*) ”number of employees”
from a,b where ano = a_no
group by a_name
having count (*) > 5
order by 2 desc;
2、不能把count(*)放在where 后边做为限制条件,因为count(*)不是表a,b中的一个列
http://www.oradb.net
2、语法错误
select a_name,count(*) ”number of employees”
from a,b where ano = a_no
group by a_name
having count (*) > 5
order by 2 desc;
having必须配合group by 使用,看看关于pl/sql方面的书。