SQL数据库查询出一张表中重复的数据,按某个字段来查找。

SELECT
    V.NUM_ID,
    V.XM 
FROM
    t_MID_RS_PARTY V 
WHERE
    V.ZGH IN ( '060002', '100178', '120283' ) SELECT
    V.ZGH 
FROM
    t_MID_RS_PARTY V 
GROUP BY
    V.ZGH 
HAVING
    COUNT( V.ZGH ) > 1

 

posted @ 2018-12-13 11:46  程序员小明1024  阅读(1709)  评论(0编辑  收藏  举报