Home > database >  Not a single set of group functions
Not a single set of group functions

Time:09-22

 
:
A: SELECT tablespace_name, SUM (bytes) free
The FROM dba_free_space

is not a single set of group function
Reason:
1, if the program using the grouping function, has two cases can be used:
Program of group by , and specify the grouping conditions so that grouping conditions can be query out together
To:
SELECT tablespace_name, SUM (bytes) free
The FROM dba_free_space
GROUP BY tablespace_name
.
If you don't use group work, can only be used alone group function
To:
SELECT SUM (bytes) free
The FROM dba_free_space
.
2, when using the grouping function, can't appear grouping conditions outside the field
Conclusion: the select need to choose the fields in query statements, must appear in the group by clause

CodePudding user response:

Wow,

Advice, recorded in the blog, accumulated more, ability also came up,

CodePudding user response:

actual combat, many a mickle makes a muckle

CodePudding user response:

Practice more, think more, summarize more, come on!
  • Related