--Setp 1
--First Duplicate data into temp table
---Setp 2
select ID
FROM DuplicateData a
LEFT JOIN
(
SELECT MIN(ID) ID, English
FROM DuplicateData
GROUP BY English
) b ON a.VID = b.ID AND
a.English = b.English
WHERE b.ID IS NULL
--setp 3
delete from Maintable where ID in (
select ID
FROM DuplicateData a
LEFT JOIN
(
SELECT MIN(ID) ID, English
No comments :
Post a Comment