Can Group Functions Be Mixed with Non-group Selection Fields?
Submitted by: AdministratorIf a group function is used in the SELECT clause, all other selection fields must be group level fields. Non-group fields can not be mixed with group fields in the SELECT clause. The script below gives you an example of invalid SELECT statements with group and non-gorup selection fields:
SQL> SELECT COUNT(*), department_id FROM departments;
ORA-00937: not a single-group group function
In this example, COUNT(*) is a group field and department_id is a non-group field.
Submitted by: Administrator
SQL> SELECT COUNT(*), department_id FROM departments;
ORA-00937: not a single-group group function
In this example, COUNT(*) is a group field and department_id is a non-group field.
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How To Recover a Dropped Table in Oracle? |
☺ | How To Write Date and Time Interval Literals in Oracle? |
☺ | What Is Input Buffer in SQL*Plus? |
☺ | How Oracle Handles Dead Locks? |
☺ | How Much Memory Your 10g XE Server Is Using? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |