共4页: 1 2 3 4 每页10篇
查出数据库中重复记录的方法 -人神共存 -------------------------------------------------------------
select * from 表 group by 字段 having count(字段)>1
-------------------------------------------------------------
select *
from Information
where Name in (
select Name from Information group by name having count(*)>1)
  xiaosh  发表于2007-03-20 11:49:11 | 阅读全文 | 评论(1) |阅读:2279 | 引用Trackback(0) | 编辑 

xiaosheng 于 2007-03-27 15:53:15 回复主题:re:查出数据库中重复记录的方法
内容: SELECT ac.uid, uc.OrderExpert, count( * ) ccount FROM accountexpencedetail ac LEFT JOIN useraccount uc ON uc.uid = ac.uid WHERE ac.recash !=0 GROUP BY ac.uid HAVING count( * ) >1 ORDER BY ccount DESC


发表评论>>

主题:

内容:

Copyright@2006 powered by xiaosheng