读书人

至少 只有解决思路

发布时间: 2012-02-13 17:20:26 作者: rapoo

至少 只有
at least
only
这两种条件用什么实现呢?

[解决办法]
至少有一条的
select id ,name from tab
where name='a'
group by id
having count(name)>1
[解决办法]

探讨
select * from a where (select count(*) from b where a.i=b.i)=1;
select * from a where (select count(*) from b where a.i=b.i)>0;

这样写可以吗

读书人网 >oracle

热点推荐