أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
You can use following ways to eliminate duplicates
1) DISTINCT
EX:
----
SELECT DISTINCT deptno FROM emp;
2) ROWID
EX:
---
SELECT deptno FROM emp e WHERE ROWID = (SELECT MAX(ROWID) FROM EMP a WHERE e.deptno = a.deptno);
3) Analytic function:
EX:
---
SELECT deptno FROM(SELECT deptno, ROW_NUMBER() OVER(PARTITION BY deptno ORDER BY deptno) rn FROM emp) WHERE rn =1;
Thanks,
Ann Pricks E
Use Distinct function..... Select Distinct Column from Table... this help you to eliminate duplicate