MySQL IN clause: max number of arguments

前端 未结 4 2059
难免孤独
难免孤独 2020-12-16 15:00

Say you have the following query:

SELECT * FROM table1 WHERE table1.id IN (1, 2, 3, 4, 5, ..., 999999)

What is a reasonable maximum for the

4条回答
  •  忘掉有多难
    2020-12-16 15:54

    It looks like a duplicate of this topic: https://stackoverflow.com/a/4275704/838712

    In the provided answer, it is clear that there is no official limit in the specs, but it rather depends on your DBMS config.

提交回复
热议问题