If your table become like this
id name salary no
| 1 | abc | 1000 | 1 |
| 2 | xyz | 2000 | 2 |
| 3 | pqr | 3000 | 3 |
| 4 | abc | 1000 | 1 |
| 5 | xyz | 2000 | 2 |
| 6 | pqr | 3000 | 3 |
then you can remove duplicate row by using T-sql statement
DELETE
FROM tbl_Duplicate
WHERE ID IN
(
SELECT MAX(ID)
FROM tbl_Duplicate
GROUP BY no
)
No comments:
Post a Comment