两种查询库中重复值的SQL
SELECT *
FROM (
SELECT *
,RANK() OVER(ORDER BY who_answ) c2
FROM Ft_Question
) b
WHERE b.c2 IN (
SELECT a.c1
FROM (
SELECT RANK() OVER(ORDER BY who_answ) AS c1
FROM Ft_Question
) a
GROUP BY c1
HAVING Count(c1) > 1)
----------------------
SELECT id, Tid, question, answer, who_quest, IP_quest, who_answ, state, time_quest, time_answer
FROM Ft_Question
WHERE (who_answ IN
(SELECT who_answ
FROM Ft_Question AS Ft_Question_1
GROUP BY who_answ
HAVING (COUNT(*) > 1)))
目前维护的开源产品:https://gitee.com/475660