用SQL查询重复记录的参考资料

| No Comments | No TrackBacks

1.jpg
2.jpg

原SQL:
SELECT T.WID,T.AID,T.PID,T.GID,T.QUAL,WAREHOUSE.WNAME,AREA.ANAME,
BASEGOODS.GNAME,DIC.MEAN,T.RECEMAN,RECEIVER.RELA,T.WANUM,
T.QTY FROM (SELECT INOUT_POSITION.WID,INOUT_POSITION.AID,
INOUT_POSITION.PID, INOUT_POSITION.GID,INOUT_POSITION.QUAL,
WARRANT.RECEMAN,WARRANT.WANUM, SUM(INOUT_POSITION.SCOUNT) AS QTY
FROM INOUT_POSITION,INOUT,WARRANT
WHERE
INOUT_POSITION.INID=INOUT.I

-------------------------------------------------------------
select * from 表 group by 字段 having count(字段)>1
-------------------------------------------------------------
select *
from Information
where Name in (
select Name from Information group by name having count(*)>1)
-------------------------------------------------------------
http://www.itpub.net/273808.html

http://topic.csdn.net/t/20050228/09/3810928.html

http://book.77169.org/ask35/how153522.htm

http://www.itpub.net/162263.html

No TrackBacks

TrackBack URL: http://www.wujianrong.com/mt-tb.cgi/431

Leave a comment

About this Entry

This page contains a single entry by kevinwu published on February 15, 2006 10:43 AM.

几个开源项目 was the previous entry in this blog.

王雷雷:无线没有停滞 互联网企业不能挣快钱 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.