Using “IN” in a WHERE clause where the number of items in the set is very large

前端 未结 10 2385
梦毁少年i
梦毁少年i 2021-02-13 05:30

I have a situation where I need to do an update on a very large set of rows that I can only identify by their ID (since the target records are selected by the user and have noth

10条回答
  •  情书的邮戳
    2021-02-13 06:17

    Another alternative is to store those numbers in a temp table and use it in a join to do the update. If you are able to execute a single update statement is definitely better than executing one statement per record.

提交回复
热议问题