在Oracle SQL中,可以使用以下幾種方法來去除重復的記錄:
SELECT DISTINCT column1, column2
FROM table_name;
SELECT column1, column2
FROM (
SELECT column1, column2, ROW_NUMBER() OVER (PARTITION BY column1 ORDER BY column2) AS rn
FROM table_name
) t
WHERE rn = 1;
SELECT column1, column2
FROM table_name
GROUP BY column1, column2;
SELECT column1, column2
FROM table_name
UNION
SELECT column1, column2
FROM table_name;