2012-08-07 77 views

回答

3

試試這個:

SELECT partID 
FROM myTable 
GROUP BY partID 
HAVING COUNT(partID) > 1 

SEE HERE for a little demo (though different fieldnames)

+0

感謝約翰,你的查詢幫我解決我的疑難問題有使用answer.My查詢是SELECT PARTID FROM bom_details WHERE bomid IN(1,2) GROUP BY PARTID HAVING COUNT讓我查詢(PARTID) > 1 – Hkachhia 2012-08-07 05:36:37

+0

歡迎哈利。 – 2012-08-07 05:39:12

+1

感謝您的熱心幫助,您的示例非常有幫助。 – Hkachhia 2012-08-07 05:40:34