create table Employee (id int, name varchar(50))
insert into Employee values (1,'raja')
insert into Employee values (2,'raja')
insert into Employee values (3,'krishna')
insert into Employee values (4,'krishna')
insert into Employee values (5,'ramana')
insert into Employee values (6,'prakash')
delete
from table T1, table T2
where T1.dupField = T2.dupField
and T1.uniqueField > T2.uniqueField
delete
from Employee T1, table T2
where T1.name = T2.name
and employee_id.id > T2.employee_id
No comments:
Post a Comment