group by having count(*) > 1 的問題
有如下幾個SQL
1.
select manno,newno
from y_sfcfsh
where manno ='C618-0800123' and prosscode ='230' and newno <> '' and newno <> null and status='3'
當執行以上這條時結果如下
manno newno
----- -----
C618-0800123 230A
C618-0800123 230A
C618-0800123 230A
2.
select manno,newno
from y_sfcfsh
where manno ='C618-0800123' and prosscode ='230' and newno <> '' and newno <> null and status='3'
group by manno,newno
當執行這條時結果如下
manno newno
----- -----
C618-0800123 230A
3.
select manno,newno
from y_sfcfsh
where manno ='C618-0800123' and prosscode ='230' and newno <> '' and newno <> null and status='3'
group by manno,newno having count( *) >1
當執行這條時結果也和第2條的結果一樣,不知道是怎么回事?請大家指教