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

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -