mysql:
SELECT * FROM info a WHERE ((SELECT COUNT(*) FROM info WHERE a.id_news = id_news and a.id_entity = id_entity) > 1) ORDER BY a.id_news
select * from INFO where ID in (select ID from INFO group by Id having count(ID) > 1)
删除重复数据
DELETE
FROM
INFO
WHERE
(ID) IN (
SELECT
ID
FROM
INFO
GROUP BY
ID
HAVING
COUNT (ID) > 1
)
AND ROWID NOT IN (
SELECT
MIN (ROWID)
FROM
INFO
GROUP BY
ID
HAVING
COUNT (*) > 1
);