What is the best way to remove duplicates from a datatable?

前端 未结 12 2077
醉酒成梦
醉酒成梦 2021-01-02 13:23

I have checked the whole site and googled on the net but was unable to find a simple solution to this problem.

I have a datatable which has about 20 columns and 10K

12条回答
  •  误落风尘
    2021-01-02 14:10

    "This datatable is being created by reading a CSV file and not from a DB."

    So put a unique constraint on the four columns in the database, and inserts that are duplicates under your design won't go in. Unless it decides to fail instead of continuing when this happens, but this surely is configurable in your CSV import script.

提交回复
热议问题