Databases
Pages
Home
MySql
Oracle
PostGRESql
MSAccess
DB2
SQL
Monday, 17 September 2012
How to delete a duplicate records in a table without using rowid?
delete from student
where id=(select max(id) from student group by id
having count(id||name)>1);
for emp table:
delete from emp
where empno=(select max(empno) from emp group by empno
having count(empno||ename)>1)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment