Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Can Group Functions Be Mixed with Non-group Selection Fields
Can Group Functions Be Mixed with Non-group Selection Fields? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY
✍: FYIcenter.com
If 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-group selection fields:
mysql> SELECT COUNT(*), url FROM fyi_links; ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
In this example, COUNT(*) is a group field and "url" is a non-group field.
2007-05-11, 5939👍, 0💬
Popular Posts:
How To Escape Special Characters in SQL statements? - MySQL FAQs - Introduction to SQL Basics There ...
How do you locate the first X in a string txt? A) txt.find('X'); B) txt.locate('X'); C) txt.indexOf(...
How To Blend a Color Layer to a Image? - PSP Tutorials - Fading Images to Background Colors with PSP...
When should the register modifier be used? Does it really help? The register modifier hints to the c...
Where Is the Submitted Form Data Stored? - PHP Script Tips - Processing Web Forms When a user submit...