-->

Spiga

Removing Duplicate Value

Using This Query you Can remove the duplicate value from a table.


Create Table Emp(Empno varchar2(6),Sal number);

insert into Emp(Empno,Sal) Values ('000100',4579);
insert into Emp(Empno,Sal) Values ('000100',4579);
insert into Emp(Empno,Sal) Values ('000100',4579);
insert into Emp(Empno,Sal) Values ('000101',5879);
insert into Emp(Empno,Sal) Values ('000102',8839);
insert into Emp(Empno,Sal) Values ('000102',8839);
insert into Emp(Empno,Sal) Values ('000102',8839);
insert into Emp(Empno,Sal) Values ('000104',2849);
Commit;

delete from emp a where rowid <
(select max(rowid) from emp b where a.empno = b.empno);

There was an error in this gadget