SUMSEN

Oracle&Sql爱好者,用友NC管理员

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
1 select custcode, custname from bd_cubasdoc where custname in (select custname from bd_cubasdoc 
group by  custname having count(*)>=2)
 
2 select  custname from bd_cubasdoc group by custname having count(*)>=2

3 select custcode,custname from bd_cubasdoc group by custcode,custname having count(*)>=2

 

1,2可以查询到,3不可以。

posted on 2012-05-30 09:07  sumsen  阅读(300)  评论(0编辑  收藏  举报