Answers:
Answer #1select * from employee a where rowid not in(Select min(rowid) from employee b where b.emp_id = a.emp_id)
Answer #2delete from emp where rowid not in (select max(rowid) from emp group by empid )
Answer #3select * from employee a where rowid in (select min(rowid) from employee b where a.emp_id=b.emp_id)
Answer #4select count(*), all_columns from table_name group by all_columns having count(*) > 1;
Answer #5DELETE FROM TABLENAME WHERE ROWID NOT IN (SELECT MAX(ROWID) FROM TABLENAME GROUP BY DUPLICATECOLUMNNAME);
Answer #6DELETE FROM EMP
WHERE ROWID NOT IN
(SELECT MIN(ROWID) FROM EMP
GROUP BY EMPNO);
WHERE ROWID NOT IN
(SELECT MIN(ROWID) FROM EMP
GROUP BY EMPNO);
Previous Question | Next Question |
Explain about the oracle disaster recovery scenarios? | How to append data in a file from one server to another server? |