sql server - How to delete multiple rows having same value in one column? -
i have table income want delete all, one, rows have same value in column "date", 2016-05-08. can help? tia.
i using row number:
with todelete ( select i.*, row_number() on (partition date order date) seqnum income ) delete todelete todelete seqnum > 1;
you can control which row kept adjusting order by
clause.
Comments
Post a Comment