![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Using Oracle SQL Let say I have a table named STUDENT this table contains the following columns STNAME, STTELE, STSCHOOL, STAGE, STPROG now I have the following two queries 1st ) select STNAME, STTELE, STAGE from STUDENT group by STNAME, STTELE, STAGE having COUNT (*) > 4; 2nd) select STNAME, STTELE, STAGE from STUDENT group by STNAME, STTELE, STAGE having COUNT (STNAME) > 4 and COUNT (STTELE) > 4 and COUNT (STAGE) > 4; Are those two queries doing EXACTLY the same thing? In other words, in COUNT(*), does the asterisk replaces all the columns from the table or does it replace ONLY the columns listed in the GROUP BY? |
![]() |
| Thread Tools | |
| Display Modes | |
| |