由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Oracle急问
相关主题
问一下oracle高手ORA-04030: out of process memory
Error Code 01034?newbie's question about oracle
Help on Oracle!![转载] help database question
Oracle Installation Help!!SORTING 中文 IN ORACLE
[转载] what's wrong with this PL/SQLfound a way to corrupt oracle on NT
question on JOIN on OracleOracle error code 12638?
ORA-1747 error 求助。connect to an oracle server on anoter machine
请教SQL问题,谢谢2 problems about Oracle
相关话题的讨论汇总
话题: group话题: oracle话题: select话题: function
进入Database版参与讨论
1 (共1页)
e**o
发帖数: 131
1
SELECT EMP.ENAME,EMP.DEPTNO,DEPT.DNAME FROM EMP,DEPT WHERE
EMP.DEPTNO=DEPT.DEPTNO GROUP BY EMP.DEPTNO ORDER BY EMP.ENAME
*
ERROR at line 1:
ORA-00979: not a GROUP BY expression
g***o
发帖数: 297
2
you donot have aggregation function such as COUNT(), MIN(), AVG() in
your SELECT statement, how can you use group by function?

【在 e**o 的大作中提到】
: SELECT EMP.ENAME,EMP.DEPTNO,DEPT.DNAME FROM EMP,DEPT WHERE
: EMP.DEPTNO=DEPT.DEPTNO GROUP BY EMP.DEPTNO ORDER BY EMP.ENAME
: *
: ERROR at line 1:
: ORA-00979: not a GROUP BY expression

c********d
发帖数: 4
3
yes. generally, all of the items in the select list must have a single value
for each group of rows. that is to say,
1. a constant
2. column function, i.e. aggregation funtion. the function will produces a
single value summarizing each group of rows.
3. grouping column (which has the same value in every row of the groups by
definition).
4. an expression involving all of the above (1, 2 and 3)
so in your case, germo is right. you have missed the aggregation function
obviously.

【在 g***o 的大作中提到】
: you donot have aggregation function such as COUNT(), MIN(), AVG() in
: your SELECT statement, how can you use group by function?

1 (共1页)
进入Database版参与讨论
相关主题
2 problems about Oracle[转载] what's wrong with this PL/SQL
Oracle 求助question on JOIN on Oracle
ERROR: ORA-03113ORA-1747 error 求助。
求教一ORACLE问题请教SQL问题,谢谢
问一下oracle高手ORA-04030: out of process memory
Error Code 01034?newbie's question about oracle
Help on Oracle!![转载] help database question
Oracle Installation Help!!SORTING 中文 IN ORACLE
相关话题的讨论汇总
话题: group话题: oracle话题: select话题: function