Home > database >  Having problems in Oracle
Having problems in Oracle

Time:09-23

The select stuName, stuAge from stuInfo
Group by stuName, stuAge
Having (count (stuName | | stuAge) & lt; 2);
But it doesn't work

Select count (stuName) from stuInfo where stuName='2' zhang;
Can query out three duplicate records

CodePudding user response:

Select * from stuInfo where stuName='2'.
This query, believe that you have a look at the data, will know that what reason,

CodePudding user response:

You first take a look at the original data,,,

CodePudding user response:

Look at the following statement shows what
The select stuName stuAge, stuName | | stuAge, count (stuName | | stuAge) from stuInfo
Group by stuName, stuAge
Having (count (stuName | | stuAge) & lt; 2);
  • Related