why no one answer my question. Thank you DXS

hongri (hongri)
select T2.A, T1.B from T T1, T T2
where T1.B = T2.B group by T2.A, T1.B having count(T2.A)>1

I changed 'where' , before the 'having' the result is same as the old one, but after 'having', the result is totally different. So what's the function of 'HAVING'? I think it just process the data before it, right?

2001-11-15 -04:00

回到话题: 闲来无事, 出道ORACLE SQL的题考考大家. 这是在下几个月前工作中遇到的问题, 看似简单, 其实不然.

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论