-- Query to delete the duplicate rows in a table (without primary key)
DELETE FROM empWHERE ROWID NOT IN
(SELECT MIN(ROWID) FROM emp GROUP BY A, B)
Delete from empwhere rowid in (select idfrom (select rowid id,Row_number()
over(partition by A, B order by SAL asc) top1FROM emp)where top1 > 1)
Wednesday, April 18, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment