查询order 表中 重复的customerID 的记录数语法
Select * From Orders Where CustomerID In (Select CustomerID From Orders Group By CustomerID Having Count(*)>1) order by customerID
Select * From 表 Where 重复字段 In (Select 重复字段 From 表 Group By 重复字段 Having Count(*)>1)
在线sql工具
http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_join
参考网站:http://www.cr173.com/html/7529_1.html