Oracle查詢表里的重復數據方法?
查單個字段: Sql代碼 SELECT TEST_NAME,COUNT(*) FROM T_TEST GROUP BY TEST_NAME HAVING COUNT(*) >1 查組合字段: Sql代碼 SELECT TEST_NAME1,TEST_NAME2,COUNT(*) FROM T_TEST GROUP BY TEST_NAME1,TEST_NAME2 HAVING COUNT(*) > 1
Oracle查詢表里的重復數據方法?
查單個字段: Sql代碼 SELECT TEST_NAME,COUNT(*) FROM T_TEST GROUP BY TEST_NAME HAVING COUNT(*) >1 查組合字段: Sql代碼 SELECT TEST_NAME1,TEST_NAME2,COUNT(*) FROM T_TEST GROUP BY TEST_NAME1,TEST_NAME2 HAVING COUNT(*) > 1