select shopID from shop where ShopName in( select ShopName from shop group by ShopName having count(*)>1 )

 

通过这种方法获得shopName重复的行数。

posted on 2009-06-12 09:17  孤独斗士  阅读(201)  评论(0编辑  收藏  举报