查詢筆數重複的資料

摘要:查詢筆數重複的資料

 

查詢NEWS_SET資料表,NS_TITLE欄位重複數量大於1(COUNT(*) > 1)!
 
SELECT NS_TITLE, COUNT(*) AS count
FROM NEWS_SET
GROUP BY NS_TITLE
HAVING (COUNT(*) > 1)