Query shows how to select duplicate records with SL No.
SELECT ROW_NUMBER() OVER (PARTITION BY EMP_NAME ORDER BY EMP_NAME) SLNO,EMP_NAME FROM EMPLOYEE
Query for remove duplicate records from table
WITH REMDUPREC
AS
(
SELECT ROW_NUMBER() OVER (PARTITION BY EMP_NAME ORDER BY EMP_NAME) SLNO,EMP_NAME FROM EMPLOYEE
)
DELETE FROM REMDUPREC WHERE SLNO>1
delete from MyTable
where uniqueField not in
(select min(uniqueField) from MyTable T2
where T2.dupField=MyTable.dupField)
1 comment:
You can find all Indian Government Private Banks all branches updated IFSC Code list along with full branch address details, Swift Code, Micr Code, Bank Toll Free no, customer care no etc.
Post a Comment