现实中我们经常使用
select * from
(select name,count(*) counter from table1 group by name)
where counter>1
或用r_id替代rownum来执行查询之类的语句。
事实证明count(*)、rownum等伪列的别名是可以用来执行查询的。
select * from
(select name,count(*) counter from table1 group by name)
where counter>1
或用r_id替代rownum来执行查询之类的语句。
事实证明count(*)、rownum等伪列的别名是可以用来执行查询的。
本文探讨了在SQL中使用count(*)及rownum等伪列的别名进行复杂查询的方法, 如使用 select * from (select name,count(*) counter from table1 group by name) where counter>1 的语句。
1587

被折叠的 条评论
为什么被折叠?



