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;
解决方案 »
- 求个pl/sql的例子
- oracle报表格式化,btitle的问题
- 请问IBM AIX下安装Oracle9i,创建数据库时,默认的数据库字符集、国家字符集、默认语言、默认日期格式分别是什么?
- oracle10.i 安装
- 存储过程问题
- 请问sqlserver2000的数据库内容能转到oracle下吗????
- 投石问路 散发
- 高价寻求关于TNSlistener良方,急急急!!!!!
- oracle的作业在linux中为什么只提交不执行?
- 大神求助Orcale Ogg java adapter 乱码问题【解决了发红包哈!】
- 一个关于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方面的书。